Encode Image Options
data class EncodeImageOptions(var quality: Int = -1, var optimize: Boolean = false, var format: EncodingFormat = EncodingFormat.JPEG) : Parcelable
Options for encoding image.
Constructors
Link copied to clipboard
constructor(quality: Int = -1, optimize: Boolean = false, format: EncodingFormat = EncodingFormat.JPEG)
Properties
Link copied to clipboard
Image format.
Link copied to clipboard
Quality parameter is for JPEG only and is in range 0 to 100. If -1, then the value from hibernation is used. In case the ImageRef was created in lazy load-mode and originally has the same format as the requested to save, then setting quality to -1 leads to simply copying from source to destination, which is time efficient and prevents quality loss caused by decoding the JPEG and then re-encoding it.