Hi All,
I have the following code:
IPixelBlock pBlocko_3 = raster.CreatePixelBlock(blockSize);
IRawPixels rRastero
IPnt tlco = new PntClass()
// pixelDatao1 is System.Array
// more code
pBlocko_3.set_PixelData(0, pixelDatao1);
Console.Write(pBlocko_3.GetVal(0,2484,633));
Console.Write(pixelDatao1.GetValue(2484,633));
//In the above Console.Write statements, I get values greater and lower then 127 (like 172 etc)
// However using below
rRastero.Write(tlco, (IPixelBlock)pBlocko_3);
//The output has values always less than and equal to 127.
//For some reason the Write method on rRastero (IRawPixels) is reducing all
// values greater then 127 to 127. So the resultant Raster has maximum value of 127
// whereas it should have values greater then 127.
// I have even read the values back from the raster and can confirm the max value is 127.
IPixelBlock temp = (IPixelBlock)rRaster2.CreatePixelBlock(pntSize2);
rRastero.Read(tlco, temp);
Console.WriteLine(temp.GetVal(0, 2484, 633)); // Print 127 instead of 172
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.
Thanks For any help.