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.

link|improve this question

64% accept rate
feedback

1 Answer

try:

 convert infile -fill white -opaque none outfile
link|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
feedback

Your Answer

 
or
required, but never shown

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