Skip to content

Repository files navigation

flutter_luban

pub package

An image compress package like Luban for Dart, based on image.This library has no system platform constraints.

If toRgb: true , it supports all readable image formats

Readable Format

Example

   CompressObject compressObject = CompressObject(
         imageXFile: imageXFile, //image file
         path: tempDir.path, //compress to path, default Directory.systemTemp.path
         useCache: true, //If there is a cache, no compression will be performed
         toRgb: true, //Convert the image to jpg
         numberOfColors: 128, //the numberOfColors of image.quantize
       );
    Luban.compressImage(compressObject).then((xfile) {
        setState(() {
          print(xfile.path);
        });
    });

About

An image compress package like Luban for Dart

Topics

Resources

Stars

216 stars

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages