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.


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


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.

  • 1
    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 clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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