Skip to main content

Crate valo_codec_software

Crate valo_codec_software 

Source
Expand description

Portable image decoding on the CPU, the fallback behind any native decoder.

Formats are compiled in by Cargo feature (png, jpeg, gif, webp, bmp). Every frame comes out oriented, resized to the request’s max_size, and converted to 8-bit sRGB: embedded ICC profiles, PNG gamma/chromaticity and CICP metadata are all applied rather than ignored. Animations are composited frame by frame; only the current composition is held in memory.

Structs§

SoftwareDecoder
SoftwareDecoder reads the formats this crate was built with, entirely on the CPU.

Enums§

EncodeError
EncodeError is why pixels could not be encoded.
Encoding
Encoding is the file encode writes, with its format’s settings.

Functions§

encode
encode writes pixels as a file in encoding. Pixels of any layout are taken, turned into packed rows of straight RGBA first when they aren’t already.