Compression class

Compression Profile

This provides information on compression parameters

Annotations

Constructors

Compression({required int maxFileSize, required int minWidth, required int minHeight, required int quality, int inSampleSize = 1, int rotate = 0, bool autoCorrectionAngle = true, bool keepExif = false, int numberOfRetries = 5, CompressFormat format = CompressFormat.jpeg})
Default constructor
const
Compression.standard()
Efficient compression with minimum values
const
Compression.withQuality(int quality, {int maxFileSize = 0, int minWidth = 1920, int minHeight = 1080})
Creates compression from quality.
const
Compression.withSize({required int maxFileSize, int minWidth = 1920, int minHeight = 1080})
Creates compression from minWidth & minHeight.
const

Properties

autoCorrectionAngle bool
Modify rotate to 0 or autoCorrectionAngle to false.
final
format CompressFormat
Compress format, only used in case of images
final
hashCode int
The hash code for this object.
no setterinherited
inSampleSize int
The param is only support android.
final
keepExif bool
If this parameter is true, EXIF information is saved in the compressed result. Default value is false.
final
maxFileSize int
Maximum byte-size of the image. Default to 250Kb
final
minHeight int
Minimum width of the image. Compression will be made around this height.
final
minWidth int
Minimum width of the image. Compression will be made around this width.
final
numberOfRetries int
No of retries before giving up on error.
final
quality int
Compression quality. Ranges from 1-100
final
rotate int
If you need to rotate the picture, use this parameter.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({int? quality, int? minWidth, int? minHeight, int? maxFileSize, CompressFormat? format, int? inSampleSize, int? rotate, bool? autoCorrectionAngle, bool? keepExif, int? numberOfRetries}) Compression
Creates a copy of this compression, but with the given fields replaced wih the new values.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited