Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. 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

RasterLayerExportClass will only create a .png with a single value transparency, however there is a bug in Google earth which prevents this from working.

The other export options don't support transparency at all? (jpg, tiff)

I do notice that the 3D analyst toolbox performs this correctly with the "Layer to KML" function, this I have no source for.

share|improve this question
Related:… – blah238 Oct 30 '12 at 4:47

I've used imagemagick's mogrify command to fix transparency for GoogleEarth, but my source images came from other software.

mogrify -type TrueColorMatte -background "black" -transparent black file.png

These options may also help -format png32 -depth 8 -type TruecolorMatte -define png:color-type=6

share|improve this answer

You can create PNGs with full transparency support using the GIMP, which is a freeware image manipulation program. Export the raster as a PNG (with or without background transparency) from your source application, and open the image in the GIMP. Set the transparency of your image to whatever level you prefer by using the Opacity slider on the right hand panel. Then choose Save As from the file menu. Once you choose a name and click Save, it will ask if you would like to Export the file (since changing the opacity creates a hidden layer in the file). Click Export and a dialog box will appear with the PNG options. One of the options is "Save color values from transparent pixels", make sure that is checked.

share|improve this answer
It sounds like a programmatic solution is being asked for. – blah238 Oct 30 '12 at 4:50
If a programmatic solution doesn't exist, or requires expensive tools, it's nice to have other options. – L_Holcombe Oct 30 '12 at 19:14

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.