EncodeImageOptions

data class EncodeImageOptions(var quality: Int = -1, var format: EncodingFormat = EncodingFormat.JPEG) : Parcelable

Options for encoding image.

Constructors

Link copied to clipboard
constructor(source: Map<String, Any?>)
constructor(json: JSONObject)
constructor(quality: Int = -1, format: EncodingFormat = EncodingFormat.JPEG)

Types

Link copied to clipboard
object Companion

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 settings from hibernation are used. In case when the Image Ref was created with a 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 jpeg encoding/decoding.

Functions

Link copied to clipboard
Link copied to clipboard
fun toJson(config: ToJsonConfiguration = ToJsonConfiguration.default()): JSONObject