Crate lodepng Copy item path Source pub use rgb::bytemuck ;ffi Bitmap Low-level representation of an image ChunkRef Reference to a chunk ChunksIter Iterator of chunk metadata, returns ChunkRef which is like a slice of PNG metadata ColorMode Color mode of an image. Contains all information required to decode the pixel
bits to RGBA colors. This information is the same as used in the PNG file
format, and is used both for PNG and raw image data in LodePNG. CompressSettings Settings for zlib compression. Tweaking these settings tweaks the balance between speed and compression ratio. Decoder Read an image with custom settings DecoderSettings Settings for the decoder. This contains settings for the PNG and the Zlib decoder, but not the Info settings from the Info structs. DecompressSettings Encoder Make an image with custom settings EncoderSettings Error Grey A Grayscale pixel (rgb crate v0.8) GreyAlpha A pixel for grayscale value + alpha components (rgb crate v0.8) Info Information about the PNG image, except pixels, width and height RGB A Red + Green + Blue pixel. Time The information of a Time chunk in PNG ChunkPosition Position in the file section after… ColorType Type for decode, encode, etc. Same as standard PNG color types. FilterStrategy automatically use color type with less bits per pixel if losslessly possible. Default: AUTO Image Bitmap types. Pod Marker trait for “plain old data”. decode24 Same as decode_memory, but always decodes to 24-bit RGB raw image decode32 Same as decode_memory, but always decodes to 32-bit RGBA raw image decode24_file Same as decode_file, but always decodes to 24-bit RGB raw image decode32_file Same as decode_file, but always decodes to 32-bit RGBA raw image decode_file Load PNG from disk, from file with given name.
Same as the other decode functions, but instead takes a file path as input. decode_memory Converts PNG data in memory to raw pixel data. encode24 Same as encode_memory, but always encodes from 24-bit RGB raw image encode32 Same as encode_memory, but always encodes from 32-bit RGBA raw image encode24_file Same as encode_file, but always encodes from 24-bit RGB raw image encode32_file Same as encode_file, but always encodes from 32-bit RGBA raw image encode_file Converts raw pixel data into a PNG file on disk.
Same as the other encode functions, but instead takes a file path as output. encode_memory Converts raw pixel data into a PNG image in memory. The colortype and bitdepth
of the output PNG image cannot be chosen, they are automatically determined
by the colortype, bitdepth and content of the input pixel data. RGBA 8-bit RGBA, alpha is last. 0 = transparent, 255 = opaque. Result