Simple encoder for low resolution, low color images.
Synopsiscpaldjvu [options] <inputppmfile> <outputdjvufile>Description
File "cpaldjvu.cpp" demonstrates a simple quasi-lossless compressor for low resolution, low color, images with a reduced number of colors (e.g screendumps). It simply quantizes the image on a limited number of colors, uses the dominant color to construct a uniform background, then performs lossless jb2 compression for all remaining objects.
Options
- -colors n
- Maximum number of colors during quantization (default 256)
- -dpi n
- Resolution written into the output file (default 100).
- -verbose
- Displays additional messages.
Remarks
This is an interesting alternative to GIF. It performs especially well on screendumps. Compression ratios can get hurt when there are continuous tone segment in the image. Demoting such segments from foreground to background is a pretty interesting project. Dithered segments behave surprisingly well.
Alphabetic index Hierarchy of classes