Revision 13943 trunk/libraries/libRaster/src/org/gvsig/raster/buffer/RasterBuffer.java
RasterBuffer.java | ||
---|---|---|
398 | 398 |
for (int i = 0; i < getBandCount(); i++) |
399 | 399 |
for (int r = 0; r < getHeight(); r++) { |
400 | 400 |
for (int c = 0; c < getWidth(); c++) { |
401 |
value = (double) (getElemByte(r, c, i));
|
|
401 |
value = (double) ((getElemByte(r, c, i)) & 0xff);
|
|
402 | 402 |
if (value > max) max = value; |
403 | 403 |
if (value < min) min = value; |
404 | 404 |
} |
... | ... | |
483 | 483 |
switch(getDataType()) { |
484 | 484 |
case IBuffer.TYPE_BYTE: |
485 | 485 |
for (int col = 0; col < getWidth(); col++) |
486 |
hist.incrementPxValue(iBand, (double)(getElemByte(row, col, iBand))); |
|
486 |
hist.incrementPxValue(iBand, (double)(getElemByte(row, col, iBand) & 0xff));
|
|
487 | 487 |
break; |
488 | 488 |
case IBuffer.TYPE_SHORT: |
489 | 489 |
for (int col = 0; col < getWidth(); col++) |
Also available in: Unified diff