pub fn encode(image: &AvifImage, opts: &EncodeOptions) -> Result<Vec<u8>>Expand description
Encode a picture as it is: its layout and depth (8 / 10 / 12-bit
4:2:0 / 4:2:2 / 4:4:4 / monochrome, alpha as the AV1-coded alpha
auxiliary item, an identity-matrix picture as the RGB it holds),
its colour as the colr nclx, its metadata as Exif / XMP
items and an ICC colr (per EncodeOptions). A canvas beyond
4096 coded pixels per axis is tiled as a grid. Lossless at the
default base_q_idx = 0. Error::Unsupported for a layout this
encoder does not carry (sub-sampled chroma at odd extents), never a
silent conversion.