Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bsteps/flutter_photon_rs
Dart ffi to photon library, an image processing library written in rust.
https://github.com/bsteps/flutter_photon_rs
ffi-bindings flutter flutter-plugin flutter-rust-bridge rust
Last synced: 2 months ago
JSON representation
Dart ffi to photon library, an image processing library written in rust.
- Host: GitHub
- URL: https://github.com/bsteps/flutter_photon_rs
- Owner: bsteps
- License: mit
- Created: 2022-04-27T11:39:09.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-05-29T11:37:28.000Z (over 2 years ago)
- Last Synced: 2024-11-09T00:12:24.834Z (2 months ago)
- Topics: ffi-bindings, flutter, flutter-plugin, flutter-rust-bridge, rust
- Language: Dart
- Homepage: https://pub.dev/packages/flutter_photon_rs
- Size: 23.5 MB
- Stars: 11
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Photon For Flutter
`flutter_photon_rs` is dart ffi to [`photon`](https://github.com/silvia-odwyer/photon) library, Photon is a high-performance Rust image processing library, which compiles to WebAssembly, allowing for safe, blazing-fast image processing both natively and on the web.Supported platforms:
- Android
- IOS## 💻 Usage
```dart
import 'package:flutter_photon_rs/flutter_photon_rs.dart';
import 'package:image_picker/image_picker.dart';// Use ImagePicker to get image from source and read as bytes
final _picker = ImagePicker();
final image = await _picker.getImage(
source: ImageSource.gallery,
);if (image != null) {
final imageBytes = await image.readAsBytes();
// returns Uint8List which you can use to store,
// or show on Image.memory() widget
final bytes = await Photon.process(
bytes: imageBytes,
filters: [
Monochrome.grayscale(),
Convolution.gaussianBlur(
radius: 20,
),
Transform.flipH(),
],
outputFormat: OutputFormat.Jpeg,
);
}
```
## 🌟 Features
- [x] Implement Photon rust lib all features
- [x] Fix Exif Reading (Image Rotation) Issue
- [x] Make Proper README.md with Documentation
- [ ] Publish on pub.dev
- [X] Add Support For IOS
- [ ] Write Rust And Flutter Test
- [ ] Benchmark
- [ ] Refactor Code for readability and efficiency