<?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: Using png for PictureMarkerSymbol in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/using-png-for-picturemarkersymbol/m-p/650267#M17446</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;By the docs you can create PicyureMarkerSymbol from bmp and emf files only.&lt;BR /&gt;Is there a way to create PictureMarkerSymbol from png file?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Mody&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi, Mody!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Certainly you can create such a PictureMarkerSymbol. You should use the Bitmap class to load the image and then pass it to the Picture property of the IPictureMarkerSymbol object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bitmap bitmap=new Bitmap(image_path);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IPictureMarkerSymbol symbol=new PictureMarkerSymbolClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;symbol.Picture=(stdole.IPictureDisp)ESRI.ArcGIS.ADF.COMSupport.OLE.GetIPictureDispFromBitmap(bitmap);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Similarly you can create the IPictureMarkerSymbol object from any image format supported by the Bitmap class, i.e. bmp, jpg, gif, exif, png, tiff. Even icons can be used for it (see the Bitmap.FromHicon method documentation).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 26 Apr 2013 04:45:27 GMT</pubDate>
    <dc:creator>AlexeySubbotin</dc:creator>
    <dc:date>2013-04-26T04:45:27Z</dc:date>
    <item>
      <title>Using png for PictureMarkerSymbol</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/using-png-for-picturemarkersymbol/m-p/650266#M17445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;By the docs you can create PicyureMarkerSymbol from bmp and emf files only.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to create PictureMarkerSymbol from png file?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mody&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Apr 2013 04:14:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/using-png-for-picturemarkersymbol/m-p/650266#M17445</guid>
      <dc:creator>ModyBuchbinder</dc:creator>
      <dc:date>2013-04-25T04:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using png for PictureMarkerSymbol</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/using-png-for-picturemarkersymbol/m-p/650267#M17446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;By the docs you can create PicyureMarkerSymbol from bmp and emf files only.&lt;BR /&gt;Is there a way to create PictureMarkerSymbol from png file?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Mody&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi, Mody!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Certainly you can create such a PictureMarkerSymbol. You should use the Bitmap class to load the image and then pass it to the Picture property of the IPictureMarkerSymbol object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bitmap bitmap=new Bitmap(image_path);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IPictureMarkerSymbol symbol=new PictureMarkerSymbolClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;symbol.Picture=(stdole.IPictureDisp)ESRI.ArcGIS.ADF.COMSupport.OLE.GetIPictureDispFromBitmap(bitmap);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Similarly you can create the IPictureMarkerSymbol object from any image format supported by the Bitmap class, i.e. bmp, jpg, gif, exif, png, tiff. Even icons can be used for it (see the Bitmap.FromHicon method documentation).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Apr 2013 04:45:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/using-png-for-picturemarkersymbol/m-p/650267#M17446</guid>
      <dc:creator>AlexeySubbotin</dc:creator>
      <dc:date>2013-04-26T04:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using png for PictureMarkerSymbol</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/using-png-for-picturemarkersymbol/m-p/650268#M17447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I found a snippet CreatePictureMarkerSymbol that can get a png file.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The png format exists in the esriIPictureType eNum and works fine but the docs say only bmp and emf are supported (??)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mody&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Apr 2013 04:00:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/using-png-for-picturemarkersymbol/m-p/650268#M17447</guid>
      <dc:creator>ModyBuchbinder</dc:creator>
      <dc:date>2013-04-29T04:00:26Z</dc:date>
    </item>
  </channel>
</rss>

