ImageResizeOptions

@Serializable
data class ImageResizeOptions(val maxLongEdgePx: Int? = 2560, val downscaleOnly: Boolean = true, val maintainAspectRatio: Boolean = true)

Mirrors io.github.aryapreetam.cmpimgcompress.ResizeOptions 1:1 so it can be used as an dev.catbit.mosaic.core.data.schemas.event.EventSchema field. Only takes effect alongside a non-null CompressionScheme.

Constructors

Link copied to clipboard
constructor(maxLongEdgePx: Int? = 2560, downscaleOnly: Boolean = true, maintainAspectRatio: Boolean = true)

Properties

Link copied to clipboard
@SerialName(value = "downscaleOnly")
val downscaleOnly: Boolean

If true, never upscales images smaller than maxLongEdgePx.

Link copied to clipboard
@SerialName(value = "maintainAspectRatio")
val maintainAspectRatio: Boolean

If true, resizing preserves the original aspect ratio.

Link copied to clipboard
@SerialName(value = "maxLongEdgePx")
val maxLongEdgePx: Int?

Caps the image's longest edge, preserving aspect ratio. Null leaves it unconstrained.