Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand Behavior of PNG Compression #22

Open
emcconville opened this issue Sep 17, 2015 · 0 comments
Open

Expand Behavior of PNG Compression #22

emcconville opened this issue Sep 17, 2015 · 0 comments

Comments

@emcconville
Copy link
Member

Folks may need additional clarity on how compression quality works (-quality) for the PNG format.

Section "PNG Compression" under formats should be expanded to included the behavior outlined in png.c.

  /* Untangle the "-quality" setting:
     Undefined is 0; the default is used.
     Default is 75
     10's digit:
        0 or omitted: Use Z_HUFFMAN_ONLY strategy with the
           zlib default compression level
        1-9: the zlib compression level
     1's digit:
        0-4: the PNG filter method
        5:   libpng adaptive filtering if compression level > 5
             libpng filter type "none" if compression level <= 5
                or if image is grayscale or palette
        6:   libpng adaptive filtering
        7:   "LOCO" filtering (intrapixel differing) if writing
             a MNG, otherwise "none".  Did not work in IM-6.7.0-9
             and earlier because of a missing "else".
        8:   Z_RLE strategy (or Z_HUFFMAN_ONLY if quality < 10), adaptive
             filtering. Unused prior to IM-6.7.0-10, was same as 6
        9:   Z_RLE strategy (or Z_HUFFMAN_ONLY if quality < 10), no PNG filters
             Unused prior to IM-6.7.0-10, was same as 6
    Note that using the -quality option, not all combinations of
    PNG filter type, zlib compression level, and zlib compression
    strategy are possible.  This will be addressed soon in a
    release that accomodates "-define png:compression-strategy", etc.
   */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant