Page 1 of 1

Problem converting png to bmp

Posted: 2013-04-09T23:56:06-07:00
by fountainhead
Hello All,

Newbie here. I am having this problem converting a png file to bmp.

The source file is: https://dl.dropbox.com/u/10439810/queries/alarm.png

I used the following code to convert the image:

Code: Select all

convert -depth 24 alarm.png alarm.bmp
But, the problem is that the generated bmp is showing distorted in photoshop ... please see screenshot here:

Image

See the original image looks correct in photoshop:
Image

Please help.

Thanks,
santosh

Re: Problem converting png to bmp

Posted: 2013-04-10T05:35:06-07:00
by pipe
Your exact commandline works for me with ImageMagick 6.7.7-10 and 6.8.3-9. Maybe photoshop can't handle transparency in BMP images? Works great in gimp. According to the internet, transparency in bmp images are non-standard.

ps. This question should probably go to the user part of the forum?

Re: Problem converting png to bmp

Posted: 2013-04-10T09:41:31-07:00
by snibgo
Your "-depth 24" is wrong, unless you have a non-standard version of IM that can process 24 bit per channel per pixel.

You might try the BMP2 and BMP3 formats:

Code: Select all

convert alarm.png BMP2:alarm2.bmp
convert alarm.png BMP3:alarm3.bmp

Re: Problem converting png to bmp

Posted: 2013-04-10T09:45:54-07:00
by fountainhead
Thank you Pipe. You pointed me in the right direction.
The transparency was the problem. I used flatten and everything seems fine now!

Thank you!
Santosh