Format Decoding Encoding
PNG All supported color types Same as decoding
JPEG Baseline and progressive Baseline JPEG
GIF Yes Yes
BMP Yes RGB(8), RGBA(8), Gray(8), GrayA(8)
ICO Yes Yes
TIFF Baseline(no fax support) + LZW + PackBits RGB(8), RGBA(8), Gray(8)
WebP Lossy(Luma channel only) No
PNM PBM, PGM, PPM, standard PAM Yes
DDS DXT1, DXT3, DXT5 No
Image image processing library
that crate provides the basic methods of image processing and image format conversion.
All image processing functions are provided for achieving and return type GenericImage trait ImageBuffer operate.
The most important is the decoder ......
Dimensions :: Returns the width and height of a tuple containing the image.
color_type: Returns the type of the color decoder generates image data.
read_image: the entire image decoded to a byte slice.
The following types of image pixels:
Rgb: the RGB pixels
Rgba: RGBA pixel
Luma: Grayscale grayscale pixel
LumaA: Grayscale with alpha gradation
all the pixels are parameterized by the type of assembly.