HeifEncoder
The encoder of one coded item type of HEIF, such as hvc1 for HEVC (#174). The core writes the container: it converts RGB to planes, cuts a large picture into the tiles of a grid, and writes the items, their properties and their references. An encoder only turns the planes of one picture into the payload of its configuration property and the coded data of its item.
Register an encoder with ImageKodec.registerHeifEncoder.
Properties
Functions
Codes planes, one picture, as parameters ask. Luma has 1 sample or more on each side, and in subsampled chroma an even number, so the picture needs no rounding up. Call cancellationCheck at a coarse step, such as once a row of coding blocks, and let what it throws pass through. Throw IllegalArgumentException for a picture the codec cannot hold.
Opens an encoder of one image sequence (#177), the pictures of one track of a HEIF file, coded as parameters ask, or returns null when this encoder codes still pictures only, as the default does. The core calls it for ImageKodec.encodeAvif and ImageKodec.encodeHeic with an animation, once for the colour track and once more for an alpha track. keyFrameInterval above 0 asks for a picture that needs no earlier one (a sync sample) at least every that many pictures; 0 asks for the first alone.