isolate_image_compress 2.0.0 copy "isolate_image_compress: ^2.0.0" to clipboard
isolate_image_compress: ^2.0.0 copied to clipboard

IsolateImageCompress is a package to compress and resize the images in isolate (IsolateFlutter).

IsolateImageCompress #

Pub

IsolateImageCompress is a package to compress and resize the images in isolate (IsolateFlutter).

Usage #

Compress #

  • Compress with file path
void compressImage(String path) async {
    final _image = IsolateImage.path(path);
    print('isolate_image_compress begin - : ${_image.data.length}');
    final _data = await _image.compress(maxSize: 1 * 1024 * 1024); // 1 MB
    print('isolate_image_compress end - : ${_data.length}');
}
  • Compress with file data (Uint8List or List<int>)
void compressImage(Uint8List fileData) async {
    print('isolate_image_compress begin - : ${fileData.length}');
    final _data =  fileData.compress(maxSize: 1 * 1024 * 1024); // 1 MB
    print('isolate_image_compress end - : ${_data.length}');
}

Resize #

void resizeImage(String path) {
    final _image = IsolateImage.path(path);
    _image.resizeWithResolution(ImageResolution.fhd);
}

Author #

IsolateImageCompress is developed by Thong Dang. You can contact me at thongdn.it@gmail.com

If you like my project, you can support me Buy Me A Coffee or star (like) for it.

Thank you! ❤️

22
likes
130
pub points
87%
popularity

Publisher

unverified uploader

IsolateImageCompress is a package to compress and resize the images in isolate (IsolateFlutter).

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, image, isolate_flutter

More

Packages that depend on isolate_image_compress