#39 some chunks don't get nuked by optipng

closed
Cosmin Truta
None
5
2013-11-04
2007-08-01
Anonymous
No

Somehow I was able to generate an image using libGD that is pixel-wise identical to the original optimized version (after being piped through optipng -zc1-9 -zm1-9 -zs0-3 -f0-5 )- the only difference is a 61 byte header in the beginning of the file.

Is it a bug that this chunk isn't getting stripped? What is this chunk (any pointers for png analysis software?) Should there be an option for stripping this sort of chunk, whatever it is?

Oh by the way, if you don't speak perl, that's just printing the first 100 bytes in the image as the decimal representation of the byte. In the rest of the file there are no more differences.

$ perl -e 'map { print ord($_)." "} split(//, join("", <>));' <kodim-01.opt.alt.png.first100bytes
137 80 78 71 13 10 26 10 0 0 0 13 73 72 68 82 0 0 3 0 0 0 2 0 8 2 0 0 0 186 148 156 109 0 11 45 1 73 68 65 84 120 94 236 253 233 147 235 105 118 39 246 37 128 4 144 0 18 200 125 223 238 126 235 214 173 170 174 170 94 217 221 228 76 147 35 114 164 209 140 102 70 114 88 94 164 80 4 101 59 244 23 216 111 29 225 55 14 201 126

$ perl -e 'map { print ord($_)." "} split(join("", <>));' <kodim-01.opt.png.first100bytes
137 80 78 71 13 10 26 10 0 0 0 13 73 72 68 82 0 0 3 0 0 0 2 0 8 2 0 0 0 186 148 156 109 0 *0 0 4 103 65 77 65 0 0 177 143 11 252 97 5 0 0 0 1 115 82 71 66 0 174 206 28 233 0 0 0 20 116 69 88 116 115 111 117 114 99 101 0 75 111 100 97 107 32 80 67 68 48 57 57 50 68 157 128 214 0* 11 45 1 73 68

Thanks!

Discussion

  • Logged In: NO

    Forgot to put my email - you can contact me via: ski-87234@allafrica.com . Thanks!

     
  • Cosmin Truta
    Cosmin Truta
    2008-07-23

    Logged In: YES
    user_id=24402
    Originator: NO

    Hello,
    Even though version 0.6.x does not have yet the feature that you suggested, this feature is actually a popular request, and will be the major work item for version 0.7.

    Best regards,
    Cosmin

     
  • Cosmin Truta
    Cosmin Truta
    2013-11-04

    Implemented in version 0.7.x. See the option -strip.

     
  • Cosmin Truta
    Cosmin Truta
    2013-11-04

    Ticket moved from /p/optipng/support-requests/1/

     
  • Cosmin Truta
    Cosmin Truta
    2013-11-04

    • status: open --> closed
    • assigned_to: Cosmin Truta
    • Group: --> Next Release (example)