<?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 Invalid image size in PictureMarkerSymbol? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/invalid-image-size-in-picturemarkersymbol/m-p/287407#M7433</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am placing images on a custom layer, and create the PictureMarkerSymbol w/ the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
PictureMarkerSymbol ps = new PictureMarkerSymbol();
ps.createMarkerSymbolFormFile(esriIPictureType.esriIPictureBitmap, imageLocation);
ps.setBitmapTransparancyColor(color);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I then try to obtain the size of the image from &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;ps.getSize()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt;, and I &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;always&lt;/SPAN&gt;&lt;SPAN&gt; get 8, even if the size is 16x16 or 32x32. This messes up the scaling code I use during rendering. I also tried &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;ps.getPicture().getHeight()/getWidth()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt;, and that gives me completely ridiculous values (&amp;gt; 400). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I previously used &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;createDynamicGlyphFromFile()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; when the rendering used dynamic layers, and it gave me accurate sizes via &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;glyph.queryDimensions()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt;. What am I doing wrong with PictureMarkerSymbol?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, with dynamic glyph I could apply a color map to the image using IDynamicSymbolProperties.setColor() to apply a color mask to an image, so I could use a single white image and apply any color I wanted to it. This does not appear to work with PictureMarkerSymbol, even though there is a setColor method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Jan 2011 18:21:44 GMT</pubDate>
    <dc:creator>BorisPelakh</dc:creator>
    <dc:date>2011-01-07T18:21:44Z</dc:date>
    <item>
      <title>Invalid image size in PictureMarkerSymbol?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/invalid-image-size-in-picturemarkersymbol/m-p/287407#M7433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am placing images on a custom layer, and create the PictureMarkerSymbol w/ the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
PictureMarkerSymbol ps = new PictureMarkerSymbol();
ps.createMarkerSymbolFormFile(esriIPictureType.esriIPictureBitmap, imageLocation);
ps.setBitmapTransparancyColor(color);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I then try to obtain the size of the image from &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;ps.getSize()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt;, and I &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;always&lt;/SPAN&gt;&lt;SPAN&gt; get 8, even if the size is 16x16 or 32x32. This messes up the scaling code I use during rendering. I also tried &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;ps.getPicture().getHeight()/getWidth()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt;, and that gives me completely ridiculous values (&amp;gt; 400). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I previously used &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;createDynamicGlyphFromFile()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; when the rendering used dynamic layers, and it gave me accurate sizes via &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;glyph.queryDimensions()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt;. What am I doing wrong with PictureMarkerSymbol?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, with dynamic glyph I could apply a color map to the image using IDynamicSymbolProperties.setColor() to apply a color mask to an image, so I could use a single white image and apply any color I wanted to it. This does not appear to work with PictureMarkerSymbol, even though there is a setColor method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Jan 2011 18:21:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/invalid-image-size-in-picturemarkersymbol/m-p/287407#M7433</guid>
      <dc:creator>BorisPelakh</dc:creator>
      <dc:date>2011-01-07T18:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid image size in PictureMarkerSymbol?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/invalid-image-size-in-picturemarkersymbol/m-p/287408#M7434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am placing images on a custom layer, and create the PictureMarkerSymbol w/ the following:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
PictureMarkerSymbol ps = new PictureMarkerSymbol();
ps.createMarkerSymbolFormFile(esriIPictureType.esriIPictureBitmap, imageLocation);
ps.setBitmapTransparancyColor(color);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;I then try to obtain the size of the image from &lt;PRE class="lia-code-sample line-numbers language-none"&gt;ps.getSize()&lt;/PRE&gt;, and I &lt;SPAN style="font-style:italic;"&gt;always&lt;/SPAN&gt; get 8, even if the size is 16x16 or 32x32. This messes up the scaling code I use during rendering. I also tried &lt;PRE class="lia-code-sample line-numbers language-none"&gt;ps.getPicture().getHeight()/getWidth()&lt;/PRE&gt;, and that gives me completely ridiculous values (&amp;gt; 400). &lt;BR /&gt;&lt;BR /&gt;I previously used &lt;PRE class="lia-code-sample line-numbers language-none"&gt;createDynamicGlyphFromFile()&lt;/PRE&gt; when the rendering used dynamic layers, and it gave me accurate sizes via &lt;PRE class="lia-code-sample line-numbers language-none"&gt;glyph.queryDimensions()&lt;/PRE&gt;. What am I doing wrong with PictureMarkerSymbol?&lt;BR /&gt;&lt;BR /&gt;Also, with dynamic glyph I could apply a color map to the image using IDynamicSymbolProperties.setColor() to apply a color mask to an image, so I could use a single white image and apply any color I wanted to it. This does not appear to work with PictureMarkerSymbol, even though there is a setColor method.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriDisplay/CreateMarkerSymbolFromFile_Example.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esriDisplay/CreateMarkerSymbolFromFile_Example.htm&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:53:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/invalid-image-size-in-picturemarkersymbol/m-p/287408#M7434</guid>
      <dc:creator>Venkata_RaoTammineni</dc:creator>
      <dc:date>2021-12-11T13:53:29Z</dc:date>
    </item>
  </channel>
</rss>

