Crate image_webp

Source
Expand description

Decoding and Encoding of WebP Images

Modulesยง

alpha_blending ๐Ÿ”’
Optimized alpha blending routines based on libwebp
decoder ๐Ÿ”’
encoder ๐Ÿ”’
Encoding of WebP images.
extended ๐Ÿ”’
huffman ๐Ÿ”’
Rudimentary utility for reading Canonical Huffman Codes. Based off https://github.com/webmproject/libwebp/blob/7f8472a610b61ec780ef0a8873cd954ac512a505/src/utils/huffman.c
loop_filter ๐Ÿ”’
Does loop filtering on webp lossy images
lossless ๐Ÿ”’
Decoding of lossless WebP images
lossless_transform ๐Ÿ”’
transform ๐Ÿ”’
vp8
An implementation of the VP8 Video Codec
vp8_arithmetic_decoder ๐Ÿ”’
yuv ๐Ÿ”’
Utilities for doing the YUV -> RGB conversion The images are encoded in the Yโ€™CbCr format as detailed here: https://en.wikipedia.org/wiki/YCbCr so need to be converted to RGB to be displayed To do the YUV -> RGB conversion we need to first decide how to map the yuv values to the pixels The y buffer is the same size as the pixel buffer so that maps 1-1 but the u and v buffers are half the size of the pixel buffer so we need to scale it up The simple way to upscale is just to take each u/v value and associate it with the 4 pixels around it e.g. for a 4x4 image:

Structsยง

EncoderParams
Allows fine-tuning some encoder parameters.
WebPDecodeOptions
WebP decoder configuration options
WebPDecoder
WebP image format decoder.
WebPEncoder
WebP Encoder.

Enumsยง

ColorType
Color type of the image.
DecodingError
Errors that can occur when attempting to decode a WebP image
EncodingError
Error that can occur during encoding.
LoopCount
Number of times that an animation loops.
UpsamplingMethod
Methods for upsampling the chroma values in lossy decoding