Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to create an image from a map, where each country is colored in a different color, where the frontiers are in black, and in which each color except black is fully transparent, while not losing the RGB information.

My tools are The Gimp or anything installable on Linux, and small scale programming (if I need to fully understand the png format, I won't succeed).

My current image is perfect, except for the transparency information. My current experiments with GIMP have always resulted in RGB information being lost when exporting the image to png or gif.

Any pointers? Thanks a lot.

share|improve this question
If alpha is 0 there is no RGB information in png or gif formats. What you are asking is not possible. – Scott Jan 5 '14 at 21:29
I wouldn't dare confront anyone on such matters, as my knowledge is practically null; yet, I would like to ask you if you are reasonably sure of that, or sure without a doubt, so that I don't spend any more time on this trail of thought. Thanks and best regards in any which case. – pouzzler Jan 5 '14 at 21:39
Would it be possible to set a 99.9% transparence, and keep RGB info? – pouzzler Jan 5 '14 at 21:42
To better understand your needs: How would you use such an image? E.g. in a program you write, or for a web page? – John Jan 5 '14 at 22:11
in a javascript webpage/program. I elected to keep a copy of the imagedata in memory, and output another transparent copy to the html 5 canvas I use. Then I do the checks on the memory copy, as any attempt to set a high transparency on the canvas, then doing pixel color checks on the canvas leads to failures too. It would be easier if all this work were done in the image to start with, but I can live with 10 lines of code, if not. – pouzzler Jan 5 '14 at 22:22

On the GIMP Export dialog for PNG files, there is a checkbox that says "Save colour values from transparent pixels". I haven't tested it, but that should do what you want.

There doesn't seem to be an equivalent option for GIF.

More on export file format options:

share|improve this answer
Yes, that should do it, regardless of @Scott's comments. – jsbueno Jan 21 '14 at 21:39

Your Answer


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.