Skip to content

A work-in-progress Rust image manipulation library/utility.

Notifications You must be signed in to change notification settings

jude-peel/chameleon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chameleon

A no-dependency Rust image manipulation utility (eventually).

Status

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.

Goals

  • 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

About

A work-in-progress Rust image manipulation library/utility.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages