requireImageSize

fun requireImageSize(width: Int, height: Int)(source)

Rejects invalid or oversized image dimensions before native decoding or pixel-array allocation. Multiplication uses Long arithmetic; the four-byte payload must fit an Int-indexed native byte buffer even with larger custom limits.

Parameters

width

source image width, which may be zero for an empty image.

height

source image height, which may be zero for an empty image.

Throws

when dimensions or pixel payload exceed the selected ceilings.