A no-dependency Rust image manipulation utility (eventually).
The chunk parsing, decompression, and filtering all work well. Right now, the PNG decoder can successfully convert simple pictures using the RGB color type. The next steps are to tackle interlacing, the other color types, and then add support for as many optional ancillary chunks as possible.
Thanks to PngSuite by Willem van Schaik, I now have a good way to test and fix all of the many edge cases the PNG format provides.
- CLI
- Get file input path and output path.
- Write usage and help blurb.
- Expand with feature set.
- PNG Decoder
- Read PNG file header.
- Get all chunks.
- Check the CRC on each chunk.
- Decompress IDAT.
- Concatenate ZLIB bitstreams from IDAT chunks.
- Parse ZLIB header/adler32.
- DEFLATE decompression.
- Block type 0.
- Block type 1.
- Prefix code decoding.
- LZSS decoding.
- Block type 2.
- Dynamic prefix code tree generation.
- Same things from block type 1 but slightly different.
- Filters.
- None.
- Sub.
- Up.
- Average.
- Paeth.
- Color types.
- Grayscale.
- RGB.
- Palette index.
- Grayscale + alpha.
- RGB + alpha.
- Interlacing.
- None.
- Adam7.
- Ancillary chunks.
- tRNS
- gAMA
- cHRM
- sRGB
- iCCP
- tEXt
- zTXt
- iTXt
- bKGD
- pHYs
- sBIT
- sPLT
- hIST
- tIME