Convert BMP to PNG and then make one colour tranparent

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
sssycak
Posts: 2
Joined: 2016-08-23T04:48:54-07:00
Authentication code: 1151

Convert BMP to PNG and then make one colour tranparent

Post by sssycak »

Hello guys!

I have a struggle with converting BMP images into PNG and then making one color transparent.
I've read multiple similar thread however nothing worked for me.

I have set of images like this one http://goo.gl/fvD9S7, which is bmp. (If you want to know its specification, there is an output from identify -verbose command: http://goo.gl/YbLy0j )

I need to set the color of the background as transparent (it should be color #c5c0b9) and save it as PNG.

I think that I have a problem with indexed colors. I tried to use several convert options from bmp to png and after that to set the transparency which is not working. When I try to open the converted png file in GIMP, it don't let me to convert colors to alpha before I change the settings Image>Mode>RGB.

Anyone can help, please?

Thank you in advance!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Convert BMP to PNG and then make one colour tranparent

Post by snibgo »

Gimp says the general background of that image is #bfbfbf. We can make it transparent.

Code: Select all

convert VAB001.bmp -transparent #bfbfbf out.png
Does that do what you want?
snibgo's IM pages: im.snibgo.com
sssycak
Posts: 2
Joined: 2016-08-23T04:48:54-07:00
Authentication code: 1151

Re: Convert BMP to PNG and then make one colour tranparent

Post by sssycak »

Hi snibgo!

It works, thank you!
I tried always convert and then make transparent color, maybe it can be it. Never mind, thank you very much, you saved me a lot of time!
Post Reply