KiteBitmap16
A decoded image at 16 bits a sample, for the files whose low byte matters: depth maps, scientific and medical images, heavily graded photographs. KiteBitmap keeps 8 bits a channel and is what drawing wants; this keeps every bit a 16-bit PNG or TIFF stores, and ImageKodec.decode16 is where it comes from.
samples holds channels samples a pixel, row by row, interleaved (samples[(y * width + x) * channels + c]), each an unsigned 16-bit value in a Short: read one with toInt() and 0xFFFF, or through get. The channels are those the file stores once a palette is looked up: 1 gray, 2 gray and alpha, 3 RGB, 4 RGBA. Alpha is straight, as in KiteBitmap, so a gray depth map stays one sample a pixel rather than four.
samples is exposed directly, not copied. Treat it as read-only; mutate it only if you own the instance.
Throws
Functions
Apply an EXIF orientation, as KiteBitmap.oriented does. Orientation.Normal returns the same instance.
This image at 8 bits a channel, each sample cut to its high byte, which is what ImageKodec.decode returns for a 16-bit PNG or TIFF.