encodeAvif16

fun encodeAvif16(bitmap: KiteBitmap16, options: HeifEncodeOptions, metadata: ImageMetadata = ImageMetadata(), cancellationCheck: () -> Unit? = null): ByteArray(source)

Encode bitmap as an AVIF file of 10 or 12 bits a sample (HeifEncodeOptions.bitDepth; by default 10, or 12 when lossless), as encodeAvif writes an 8-bit bitmap. One or two channels code as gray, and so do three or four whose colour channels are equal. AV1 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.

Throws