Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a GIF file that has a transparent section. I want to replace that with just plain white (or some other colour), so that there is no transparent parts. Can I do this on the command line with ImaageMagick? I'm OK if the image has to change from a .gif to something else. I tried to convert it to a jpg and the tramsparent parts were black. Is there a way to customize that?

I'm using ImageMagick on Ubuntu 9.10 Karmic Koala

share|improve this question

1 Answer 1

up vote 8 down vote accepted

You can do this using the 'convert' binary that comes with imagemagick.

convert myimage.gif -alpha off myimage.gif

Read about setting it to a custom color here: http://www.imagemagick.org/Usage/formats/#gif_trans

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.