encodeHeic16
fun encodeHeic16(bitmap: KiteBitmap16, options: HeifEncodeOptions, metadata: ImageMetadata = ImageMetadata(), cancellationCheck: () -> Unit? = null): ByteArray(source)
Encode bitmap as a HEIC file of 10 or 12 bits a sample (HeifEncodeOptions.bitDepth; by default 10, or 12 when lossless), as encodeHeic writes an 8-bit bitmap. One or two channels code as gray, and so do three or four whose colour channels are equal. HEVC holds 12 bits at most, so decode16 gives each sample back rounded to the coded depth; a lossless file gives back exactly every sample that a file of its depth can give, such as the samples decode16 read from one.