<?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 Issue with IRawPixels.write in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-irawpixels-write/m-p/1012145#M20238</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have the following code:&lt;/P&gt;&lt;PRE&gt;IPixelBlock pBlocko_3 = raster.CreatePixelBlock(blockSize);&lt;BR /&gt;IRawPixels rRastero&lt;BR /&gt;IPnt tlco = new PntClass()&lt;BR /&gt;&lt;BR /&gt;// pixelDatao1 is System.Array&lt;BR /&gt;// more code&lt;BR /&gt;pBlocko_3.set_PixelData(0, pixelDatao1);&lt;BR /&gt;Console.Write(pBlocko_3.GetVal(0,2484,633));&lt;BR /&gt;Console.Write(pixelDatao1.GetValue(2484,633));&lt;BR /&gt;&lt;BR /&gt;//In the above Console.Write statements, I get values greater and lower then 127 (like 172 etc)&lt;BR /&gt;&lt;BR /&gt;// However using below&lt;BR /&gt;rRastero.Write(tlco, (IPixelBlock)pBlocko_3);&lt;BR /&gt;//The output has values always less than and equal to 127.&lt;BR /&gt;&lt;BR /&gt;//For some reason the Write method on rRastero (IRawPixels) is reducing all &lt;BR /&gt;// values greater then 127 to &lt;STRONG&gt;127&lt;/STRONG&gt;. So the resultant Raster has maximum value of &lt;STRONG&gt;127 &lt;/STRONG&gt;&lt;BR /&gt; // whereas it should have values greater then 127.&lt;BR /&gt;// I have even read the values back from the raster and can confirm the max value is 127.&lt;BR /&gt;&lt;BR /&gt;IPixelBlock temp = (IPixelBlock)rRaster2.CreatePixelBlock(pntSize2);&lt;BR /&gt;rRastero.Read(tlco, temp);&lt;BR /&gt;Console.WriteLine(temp.GetVal(0, 2484, 633)); // Print 127 instead of 172&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone encountered this behavior. Note the above code worked fine in version 10.0 and on a local machine however now the code runs on a cloud based machine and is on version 10.6.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks For any help.&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 23 Dec 2020 19:33:41 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-12-23T19:33:41Z</dc:date>
    <item>
      <title>Issue with IRawPixels.write</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-irawpixels-write/m-p/1012145#M20238</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have the following code:&lt;/P&gt;&lt;PRE&gt;IPixelBlock pBlocko_3 = raster.CreatePixelBlock(blockSize);&lt;BR /&gt;IRawPixels rRastero&lt;BR /&gt;IPnt tlco = new PntClass()&lt;BR /&gt;&lt;BR /&gt;// pixelDatao1 is System.Array&lt;BR /&gt;// more code&lt;BR /&gt;pBlocko_3.set_PixelData(0, pixelDatao1);&lt;BR /&gt;Console.Write(pBlocko_3.GetVal(0,2484,633));&lt;BR /&gt;Console.Write(pixelDatao1.GetValue(2484,633));&lt;BR /&gt;&lt;BR /&gt;//In the above Console.Write statements, I get values greater and lower then 127 (like 172 etc)&lt;BR /&gt;&lt;BR /&gt;// However using below&lt;BR /&gt;rRastero.Write(tlco, (IPixelBlock)pBlocko_3);&lt;BR /&gt;//The output has values always less than and equal to 127.&lt;BR /&gt;&lt;BR /&gt;//For some reason the Write method on rRastero (IRawPixels) is reducing all &lt;BR /&gt;// values greater then 127 to &lt;STRONG&gt;127&lt;/STRONG&gt;. So the resultant Raster has maximum value of &lt;STRONG&gt;127 &lt;/STRONG&gt;&lt;BR /&gt; // whereas it should have values greater then 127.&lt;BR /&gt;// I have even read the values back from the raster and can confirm the max value is 127.&lt;BR /&gt;&lt;BR /&gt;IPixelBlock temp = (IPixelBlock)rRaster2.CreatePixelBlock(pntSize2);&lt;BR /&gt;rRastero.Read(tlco, temp);&lt;BR /&gt;Console.WriteLine(temp.GetVal(0, 2484, 633)); // Print 127 instead of 172&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has anyone encountered this behavior. Note the above code worked fine in version 10.0 and on a local machine however now the code runs on a cloud based machine and is on version 10.6.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks For any help.&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Dec 2020 19:33:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/issue-with-irawpixels-write/m-p/1012145#M20238</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-12-23T19:33:41Z</dc:date>
    </item>
  </channel>
</rss>

