compress method

ImageFile compress([
  1. Configuration config = const Configuration()
])

Compress image file input synchronously

On Flutter, you can run this compression on background using isolates with

ImageFile imageFile; Configuration config;
var compressedImage = await compute(imageFile.compress, config);

Implementation

ImageFile compress([Configuration config = const Configuration()]) =>
    c.compress(ImageFileConfiguration(input: this, config: config));