<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to export to PNG with transparent background in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244196#M18978</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ben,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not sure on "tile" layers, but it sounds like you are putting this image into ArcMap (since you mention there may be a basemap underneath).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If so, you can get properties of the layer in the mxd, Display tab, there is a transperancy setting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Othewise, you can set it with the layer properties &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00s300000008000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//00s300000008000000&lt;/A&gt;&lt;SPAN&gt; .&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Aug 2013 15:10:02 GMT</pubDate>
    <dc:creator>RhettZufelt</dc:creator>
    <dc:date>2013-08-20T15:10:02Z</dc:date>
    <item>
      <title>How to export to PNG with transparent background</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244191#M18973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi there, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the following line of code to export an mxd to PNG 8 bit (i am creating tiles)... BUT i cant seem to set the background to transparent (or No Color)... any clue as to what parameter&amp;nbsp; i should use?!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;arcpy.mapping.ExportToPNG(mxd, pngpath, df, df_export_width = 256, df_export_height = 256, resolution = 70, world_file=False, color_mode = "8-BIT_PALETTE", background_color = "No Color", transparent_color = "No Color")&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I read on other forum threads that by setting the background color and transparent color to the same value should do the trick... it does not work in my case.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The data-frame background color is set to Hollow...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any tips would be great &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Aug 2013 05:38:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244191#M18973</guid>
      <dc:creator>BenoitMetzger</dc:creator>
      <dc:date>2013-08-13T05:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to export to PNG with transparent background</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244192#M18974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, set the background color and the transparant color to the same color.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;However, "No Color" is not a color.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;color_mode="24-BIT_TRUE_COLOR",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;background_color="255,0,255",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;transparent_color="255,0,255"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;255 0 255 is magenta (also called minus blue).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Of course, if you are using magenta in the map you may want to pick a different color&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;or rethink your symbol colors... please &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you really need 8 bit color, then you need to pick one of your palleted colors to sacrifice to transparancy.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Aug 2013 14:54:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244192#M18974</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2013-08-13T14:54:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to export to PNG with transparent background</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244193#M18975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;worked like a charm, thank you !&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Aug 2013 00:02:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244193#M18975</guid>
      <dc:creator>BenoitMetzger</dc:creator>
      <dc:date>2013-08-14T00:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to export to PNG with transparent background</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244194#M18976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Mark, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now that i have the background set as being fully transparent, I was wondering if it is possible to set some transparency to the rest of the PNG. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically, I am creating tile layers and would like to set a transparency to the tile so I can see through in case I have a basemap underneath. My layer in the mxd has a transparency set to 40% but when exported as an image, the PNG is not transparent...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be great.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ben&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 00:37:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244194#M18976</guid>
      <dc:creator>BenoitMetzger</dc:creator>
      <dc:date>2013-08-20T00:37:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to export to PNG with transparent background</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244195#M18977</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Feature transparency support in image export has been on the wish list for a long time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What you seem to want is, also, a partial transparence; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;which is even more complicated, and even less likley to be avaliable soon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You could try using a diagonal line fill over the areas you want partly transparent;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;make the lines the color you will set as the transparent background color.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This "should" break up the opaque image into strips, with transparent strips between.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Obviously, the success of this illusion will be zoom dependant.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The trick is to get the line width and spacing right for the zoom you want to optimize.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thus, you will still see the overlay tile and the underlying base map, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;both with enough coherence to make them understandable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...not, likely, a very good solution.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 12:42:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244195#M18977</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2013-08-20T12:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to export to PNG with transparent background</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244196#M18978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ben,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not sure on "tile" layers, but it sounds like you are putting this image into ArcMap (since you mention there may be a basemap underneath).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If so, you can get properties of the layer in the mxd, Display tab, there is a transperancy setting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Othewise, you can set it with the layer properties &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//00s300000008000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//00s300000008000000&lt;/A&gt;&lt;SPAN&gt; .&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 15:10:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244196#M18978</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2013-08-20T15:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to export to PNG with transparent background</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244197#M18979</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Mark and Rhett, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;looks like it's a dead end for transparency on the layer then.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rhett, you are right in the case where the tiles are viewed in ArcGIS. But it is not my case, I actually load these tiles in n SQLite database to be viewed on another platform (and that platform does not have transparency settings). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Setting transparency to the entire tile sadly seems not possible in ArcGIS... I managed to do this with Smallworld though... &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 03:38:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244197#M18979</guid>
      <dc:creator>BenoitMetzger</dc:creator>
      <dc:date>2013-08-21T03:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to export to PNG with transparent background</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244198#M18980</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The PIL(Python Image Library) or Pillow (fork of PIL) modules might have a way. They're for working with several image formats in python. I haven't used either though. I just know of their existence.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Aug 2013 14:40:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244198#M18980</guid>
      <dc:creator>MattSayler</dc:creator>
      <dc:date>2013-08-21T14:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to export to PNG with transparent background</title>
      <link>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244199#M18981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry for the cross-over in sites.&amp;nbsp; But I developed a Python-window script, posted here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://gis.stackexchange.com/questions/71973/how-to-export-a-mxd-to-a-image-with-transparent-background"&gt;http://gis.stackexchange.com/questions/71973/how-to-export-a-mxd-to-a-image-with-transparent-background&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2013 15:26:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-export-to-png-with-transparent-background/m-p/244199#M18981</guid>
      <dc:creator>KarstenSedmera</dc:creator>
      <dc:date>2013-09-20T15:26:46Z</dc:date>
    </item>
  </channel>
</rss>

