Shouldn't -strip preclude PNG bKGD chunk?

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
WinTakeAll
Posts: 4
Joined: 2016-03-28T01:23:10-07:00
Authentication code: 1151

Shouldn't -strip preclude PNG bKGD chunk?

Post 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
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W

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

Post by glennrp »

Also, "-strip" fails to remove the cHRM chunk, and there's no question in my mind that it should.
WinTakeAll
Posts: 4
Joined: 2016-03-28T01:23:10-07:00
Authentication code: 1151

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

Post by WinTakeAll »

Ok, I went ahead and raised Issue #156 on GitHub re this.
Post Reply