-   Linux - Software (
-   -   ImageMagick - convert (

cornish 06-12-2006 08:07 PM

ImageMagick - convert

I have ImageMagick installed and i'm really trying my hardest here, I want to convert a png file which has a Bit depth of 32 bps to a png file with 24Bps

Are there any image experts out there who could tell what the proper command is.

so far im trying

convert -depth 24 name.png name1.png

But for some bizare reason it now tells me that it has a bit depth of 64Bps

Please help

jlinkels 06-13-2006 07:19 AM

This is the description of the -depth parameter in convert:


This is the number of bits in a color sample within a pixel. The only acceptable values are 8 or 16. Use this option to specify the depth of raw images whose depth is unknown such as GRAY, RGB, or CMYK, or to change the depth of any image after it has been read.
24 is an invalid value, although you have 24 bps. I think what you want is a depth of 8, e.g. 8 bits per color, totalling to 24 bits per sample.

On the other hand, how can the format that you have ever be 32 bits? Is it RGBA? But then the depth is still 8 bits, and besides, it is an internal PNG representation.


cornish 06-13-2006 08:44 AM

The picture is off a cursor used in a game, wine wont display it because its 32 bit pixel

jlinkels 06-13-2006 09:26 AM

But then again, PNG is PNG and convert only understands depths of 8 bits and 16 bits.

If your WINE appliction complains that is is 32 bits, it certainly uses another method of bit counting than convert.

It appears to me that your WINE application is not able to read PNG, at least not the PNG as is written by the application you created it with.

Can't you convert your PNG to JPG, BMP or GIF?


All times are GMT -5. The time now is 06:55 PM.