When I use both -depth and -color in one command the -depth gets ignored and I end up with a 4-bit (or less) colormap on some images. This would be fine except some of the devices I need to read this image fail to decode anything less than 8-bit images.

I am getting images from a script that cuts up large images into sections. Some of the sections contains a very small number of colors, perhaps 1. The test image I am using can be found here: http://waxor.com/test.png.

What I need is to convert test.png into a png8 with an 8-bit colormap. I can do this by just specifying -depth. I need to specify the number of colors, even if it it larger then the number in this image since some of my images contain more then 256 colors. This is because I need to limit the full size image to say, 70 colors. I would like to do this without using 2 convert calls.


//Here are some examples:
// This works fine
antenna:~ mikel$ convert test.png -depth 8  png8:png8.png; file png8.png
png8.png: PNG image data, 213 x 163, 8-bit colormap, non-interlaced

//this does not
antenna:~ mikel$ convert test.png -depth 8 -colors 70 png8:png8.png; file png8.png
png8.png: PNG image data, 213 x 163, 1-bit colormap, non-interlaced

// Attempt with 2 calls
antenna:~ mikel$ convert test.png -depth 8 -colors 70 png8:png8.png; convert png8.png -depth 8 png8-8.png; file png8-8.png
png8-8.png: PNG image data, 213 x 163, 1-bit colormap, non-interlaced

// 2 calls, reverse order, also fails.
antenna:~ mikel$ convert test.png -colors 70 png:png.png; convert png.png -depth 8 png8:png8.png; file png8.png
png8.png: PNG image data, 213 x 163, 1-bit colormap, non-interlaced

Am I misunderstanding what -depth should do or should I file a bug on he bug list?

Thanks in advance,
-Mikel


PS
OS:
Mac OS 10.4.11

Convert version (installed via fink)
Version: ImageMagick 6.3.5 11/13/07 Q16 http://www.imagemagick.org

_______________________________________________
Magick-users mailing list
[email protected]
http://studio.imagemagick.org/mailman/listinfo/magick-users

Reply via email to