encodeJp2Wide
fun encodeJp2Wide(bitmap: KiteBitmap16, options: Jp2EncodeOptions = Jp2EncodeOptions(), metadata: ImageMetadata = ImageMetadata(), cancellationCheck: () -> Unit? = null): ByteArray(source)
encodeJp2 for a KiteBitmap16: its channels as components, 1 gray, 2 gray and alpha, 3 RGB, 4 RGBA, at 16 bits a sample or at Jp2EncodeOptions.bitsPerSample, each sample scaled to that depth and rounded. Lossless, decode16 returns the samples of a 16-bit file exactly, and those of a shallower one as it widens them, so a bitmap decode16 read from a 12-bit file comes back the same at 12 bits.
Throws
if options asks tiles so small that the image needs more than 65535 of them