On Tue, 13 Apr 2010 06:31:31 +0000
[email protected] wrote:

| 
| Hello,
| 
| Newbie trying to set the pixel depth when creating a bitmap image from raw 
8-bit grayscale data (i.e. each byte is one pixel 0x00 - 0xff)
| 
| > convert -size 100x200 -depth 8 gray:rawdata image.bmp
| 
| This gives me image.bmp with 24-bit depth. But how can I force .bmp to be 
also only 8-bit?
| 
| Running ImageMagick-6.6.1-Q8 on Vista x32
| 
| Best regards
| /HÃ¥kan
| 
-depth 8 means 8 bits per value, it does not control the number
of channels in the output image.
If your BMP image is 24 bit it is still outputing RGB data!
8 bits of red green and blue!

The -depth should after the image read.  See the top of IM Examples
Basics as to why.
   http://www.imagemagick.org/Usage/basics/

Now for you problem.
try   -type Grayscale  For example...

   convert -size 100x200 gray:rawdata  -depth 8 -type Grayscale image.bmp

The -type basically controls the sub-formats of output images. 

  Anthony Thyssen ( System Programmer )    <[email protected]>
 --------------------------------------------------------------------------
   "I didn't think I was going to survive that...".
   "YOU WERE CORRECT", replied Death.   -- Terry Pratchett, "Men At Arms"
 --------------------------------------------------------------------------
   Anthony's Castle     http://www.cit.griffith.edu.au/~anthony/

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

Reply via email to