SaveImageOptions

data class SaveImageOptions(var quality: Int = -1, var optimize: Boolean = false, var encryptionMode: EncryptionMode = EncryptionMode.AUTO, var encrypter: CoreStreamProvider? = null) : Parcelable

Options for saving image to a path.

Constructors

Link copied to clipboard
constructor(source: Map<String, Any?>)
constructor(json: JSONObject)
constructor(quality: Int = -1, optimize: Boolean = false, encryptionMode: EncryptionMode = EncryptionMode.AUTO, encrypter: CoreStreamProvider? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Custom encrypter to use when saving the image if the encryptionMode implies encryption must be used.

Link copied to clipboard

Encryption mode.

Link copied to clipboard

If true, the encoder will spend extra time when saving JPEG files to improve the compression rate. Enabling this option has no impact on quality.

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.

Functions

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