Page 1 of 1

Convert 32-bit BMP to PNG

Posted: 2014-08-17T15:02:12-07:00
by Synthic
Sorry for asking this seemingly straightforward question, but I've been trying for so long without success

I need to convert a 32-bit BMP to PNG, preserving the alpha channel. I thought this would be straight forward

Code: Select all

Convert before.BMP after.PNG
I've also tried varius parameters such as -channel argb and so on without success.
I have a bunch of bmp's I need to batch convert through code, and I've been trying all day to do this with varius tools.
Any thoughts and help is very much appreciated!

Re: Convert 32-bit BMP to PNG

Posted: 2014-08-17T15:41:24-07:00
by snibgo
What version of IM? What platform?

Put your file somewhere like dropbox.com and paste the URL here.

Re: Convert 32-bit BMP to PNG

Posted: 2014-08-17T15:52:47-07:00
by fmw42
try

Convert before.BMP PNG32:after.PNG

If you have an older format BMP, perhaps try

Convert BMP3:before.BMP PNG32:after.PNG

Re: Convert 32-bit BMP to PNG

Posted: 2014-08-17T19:00:23-07:00
by glennrp
fmw42 wrote:If you have an older format BMP, perhaps try

Convert BMP3:before.BMP PNG32:after.PNG
The "BMPn:" prefix has no effect on the bmp decoder; it's currently only used by the encoder for selecting an output format.
Putting it in front of the input filename is harmless, though.