https://github.com/crazecoder/flutter_luban
An image compress package like Luban for Dart
https://github.com/crazecoder/flutter_luban
compression dart flutter image luban
Last synced: 7 months ago
JSON representation
An image compress package like Luban for Dart
- Host: GitHub
- URL: https://github.com/crazecoder/flutter_luban
- Owner: crazecoder
- License: bsd-3-clause
- Created: 2019-01-24T09:13:01.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-26T11:00:13.000Z (9 months ago)
- Last Synced: 2025-06-07T11:08:53.804Z (8 months ago)
- Topics: compression, dart, flutter, image, luban
- Language: Dart
- Homepage:
- Size: 318 KB
- Stars: 215
- Watchers: 5
- Forks: 55
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter_luban
[](https://pub.dartlang.org/packages/flutter_luban)
An image compress package like [Luban](https://github.com/Curzibn/Luban) for Dart, based on [image](https://github.com/brendan-duncan/image).This library has no system platform constraints.
### Example
```dart
CompressObject compressObject = CompressObject(
imageFile:imageFile, //image
path:tempDir.path, //compress to path
quality: 85,//first compress quality, default 80
step: 9,//compress quality step, The bigger the fast, Smaller is more accurate, default 6
mode: CompressMode.LARGE2SMALL,//default AUTO
);
Luban.compressImage(compressObject).then((_path) {
setState(() {
print(_path);
});
});
```
