PeachImage

PeachImage.Formats.Avif Namespace

Classes  
AvifDecoderOptions AVIF-specific decode options. Currently adds nothing beyond TargetPixelFormat.
AvifDecodingException Thrown when an AVIF file is malformed or its AV1 bitstream cannot be decoded due to a genuine defect.
AvifEncoderOptions AVIF-specific encode options. This encoder only ever produces an 8-bit still image in this version -- there is deliberately no bit-depth toggle yet, since a silently-ignored knob would be misleading. Quality-based (non-lossless) encoding is always 4:2:0/BT.601; Lossless switches to 4:4:4 with an identity color matrix instead (see that property’s remarks). A source image with real (non-fully-opaque) alpha is encoded as a second, independent monochrome AV1 image item referenced via iref auxl, straight (non-premultiplied) only; a fully opaque Rgba32 source is auto-downgraded to plain RGB24 with no alpha item.
AvifEncodingException Thrown when an Image cannot be encoded as AVIF, either because its pixel format is unsupported by this encoder or its dimensions exceed what it can represent. Alpha-bearing source images are rejected via AvifUnsupportedFeatureException instead -- see its own remarks.
AvifFormatException Base type for exceptions specific to the AVIF codec.
AvifUnsupportedFeatureException Thrown when an AVIF file uses a feature that is deliberately out of scope for this decoder (animated AVIF, film grain synthesis, 12-bit depth, gain maps, palette/IntraBC mode, super-resolution) rather than one that is malformed. Kept as a sibling of AvifDecodingException (not a subclass) so corpus/differential tests can distinguish “this file deliberately isn’t supported, skip it” from “this is a real decoding bug” by catching this narrower type first. Also used on the encode side for source images whose content is deliberately out of scope for this encoder rather than malformed – specifically, an Image with a non-opaque alpha channel, since this encoder only produces opaque AVIF still images in this version.