downscaledTo

fun KiteBitmap.downscaledTo(targetWidth: Int, targetHeight: Int): KiteBitmap(source)

Downscale to exactly targetWidth×targetHeight with scaled's alpha-weighted box filter. The caller chooses the aspect ratio; this operation does not fit the requested dimensions inside another box. Equal dimensions return this instance.

Throws

if either dimension is not positive or exceeds the corresponding source dimension


fun KiteAnimation.downscaledTo(targetWidth: Int, targetHeight: Int): KiteAnimation(source)

Downscale every frame to exactly targetWidth×targetHeight with KiteBitmap.downscaledTo, preserving delays and the play count. Equal canvas dimensions return this instance.

Throws

if either dimension is not positive or exceeds the corresponding canvas or frame dimension