CompressionOptions constructor

const CompressionOptions({
  1. int? maxBytes,
  2. int quality = 85,
  3. int minQuality = 10,
  4. int? maxWidth,
  5. int? maxHeight,
  6. OutputFormat format = OutputFormat.preserve,
  7. bool autoOrientation = true,
  8. bool keepExif = false,
})

Creates a new CompressionOptions instance.

Implementation

const CompressionOptions({
  this.maxBytes,
  this.quality = 85,
  this.minQuality = 10,
  this.maxWidth,
  this.maxHeight,
  this.format = OutputFormat.preserve,
  this.autoOrientation = true,
  this.keepExif = false,
}) : assert(quality >= 1 && quality <= 100, 'quality must be between 1 and 100'),
     assert(minQuality >= 1 && minQuality <= quality, 'minQuality must be between 1 and quality');