Page 1 of 1

Shouldn't -strip preclude PNG bKGD chunk?

Posted: 2016-03-28T01:49:06-07:00
by WinTakeAll
I'd expect convert -strip to cut all ancillary PNG chunks including bKGD. I understand I can accomplish this with e.g. define png:exclude-chunk=bkgd but why not with -strip? Note that for paletted images IM's default behavior of adding a white background chunk will mess with the palette and add an extra unneeded color, possibly causing the image to require a higher depth than without it. Yes I know I can set the background to something present in the image, but again why not avoid it with -strip?

@glennrp posted an old comment that implies that -strip avoids everything but gAMA, see: viewtopic.php?f=1&t=17729#p67041

The docs are very brief on this, just saying "strip the image of any profiles or comments". Would be good if they were more specific, see: http://imagemagick.org/script/command-l ... .php#strip

Re: Shouldn't -strip preclude PNG bKGD chunk?

Posted: 2016-03-28T05:37:18-07:00
by glennrp
Also, "-strip" fails to remove the cHRM chunk, and there's no question in my mind that it should.

Re: Shouldn't -strip preclude PNG bKGD chunk?

Posted: 2016-03-28T20:09:31-07:00
by WinTakeAll
Ok, I went ahead and raised Issue #156 on GitHub re this.