Problems Creating 4-Bit Grayscale PNGs
Posted: 2011-04-10T10:47:51-07:00
				
				I work a lot with 4-bit grayscale PNGs, but I've noticed this odd behavior that I don't see with any other bit depths.  Here are the results of the following commands:
What in the world is happening with the 4-bit grayscale image?
			- convert -size 300x300 xc:white -draw 'line 0,0,300,300' -type Grayscale -depth 8 line8.png

 - convert -size 300x300 xc:white -draw 'line 0,0,300,300' -type Grayscale -depth 4 line4.png

 - convert -size 300x300 xc:white -draw 'line 0,0,300,300' -type Grayscale -depth 2 line2.png

 - convert -size 300x300 xc:white -draw 'line 0,0,300,300' -type Grayscale -depth 1 line1.png

 
Code: Select all
% convert -version        
Version: ImageMagick 6.6.7-6 2011-03-10 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
Features: OpenMP  HDRI 
% libpng-config  --version
1.4.5