Convert 32-bit BMP to PNG

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Synthic
Posts: 1
Joined: 2014-08-17T14:55:22-07:00
Authentication code: 6789
Contact:

Convert 32-bit BMP to PNG

Post 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!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK
Contact:

Re: Convert 32-bit BMP to PNG

Post by snibgo »

What version of IM? What platform?

Put your file somewhere like dropbox.com and paste the URL here.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA
Contact:

Re: Convert 32-bit BMP to PNG

Post 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
User avatar
glennrp
Posts: 1147
Joined: 2006-04-01T08:16:32-07:00
Location: Maryland 39.26.30N 76.16.01W
Contact:

Re: Convert 32-bit BMP to PNG

Post 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.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 6 guests