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.

For every picture (e.g. bmp, png), a transparent point actually does have a color

The transparency is either

  • defined by alpha channel mask (e.g. in PNG)
  • or one of the colors is defined as transparent, and the viewer program is responsible to replace pixels with this color - as transparent.

I have a strange scenario, where one program knows transparency, the other doesn't so it shows the original color.

So

I want to replace the color only in the pixels where it is defined to be transparent. I need it all to be defined as white, while keeping it transparent

I can pre-convert my input to be a specific format, if it helps the process.

For now my toolbox includes: ImageMagick, Gimp, python programming (PIL) and maybe more, but I don't know how to do this specific task with these tools.

share|improve this question

1 Answer 1

try:

 convert infile -fill white -opaque none outfile
share|improve this answer
    
no: it deletes the transparency - i want to keep transparency, but replace the color behind it! I rephrased my question. תודה בכל אופן. –  Berry Tsakala Sep 20 '11 at 13:14
    
Maybe this will help. –  Noam N. Kremen Sep 20 '11 at 14:15

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.