Re: set depth of bitmap image

Hakan Eriksson <[email protected]>
Newsgroups gmane.comp.video.image-magick.user
Message-ID <[email protected]>
Hello,

Thanx for all help.

"-colors 256" and "-type palette" worked fine. I did not manage to get "convert -size 100x200 gray:rawdata  -depth 8 -type Grayscale image.bmp" to work, still 24-bit depth.

Anyway, problem solved. Thanx again.

Best regards,
Håkan

> Date: Wed, 14 Apr 2010 11:17:43 +1000
> From: [email protected]
> To: [email protected]
> Subject: Re: [magick-users] set depth of bitmap image
> 
> 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
 		 	   		  
_________________________________________________________________
Messenger i mobilen!
http://new.windowslivemobile.msn.com/SE-SE/windows-live-messenger-wap/default.aspx
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.