`-bit_depth 8` corrupts output when applied to 16-bit input
Brought to you by:
glennrp
Applying -bit_depth 8
to an 16-bit input PNG might be expected to reduce the color depth (particularly if there are, in fact, fewer than 2^24 unique colors) but it instead appears to change the image header but leave the data unchanged, thus mangling both the colors and the geometry! Please see the example input and output PNGs which I have attached.
If this is not intended to be supported (it would involve a bunch of extra algorithmic goo) pngcrush
should error out rather than creating a corrupt output file.
(Originally reported as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=546267 )
Verified that -bit_depth 8 produces an incorrect image, and -reduce detects that the image is not reducible to 8-bit depth without loss and therefore does not attempt to reduce it.
The "-bit_depth N" option was removed from pngcrush-1.7.68 and later.
closed-fixed.