Module png
Expand description
Lossless PNG encoding and decoding of tightly packed 8-bit RGBA frames.
Screenshots, clipboard images, image widgets and test fixtures all move
plain RGBA through PNG. These helpers keep that one path on the image
codec the toolkit already carries for its other formats.
Structs§
- Rgba8
- A decoded PNG as 8-bit RGBA.
Functions§
- decode_
rgba8 - Decode a PNG of any colour type and bit depth into 8-bit RGBA.
- decode_
rgba8_ within - Like
decode_rgba8, but rejects images with more thanmax_pixelspixels before decoding any image data. - encode_
rgba8 - Encode
rgba(width * height * 4bytes, row-major) as a PNG. - read_
rgba8 - Read and decode the PNG file at
pathinto 8-bit RGBA. - write_
rgba8 - Encode
rgbaas a PNG file atpath, replacing any existing file.