Revision 8793 org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.legend/org.gvsig.raster.lib.legend.impl/src/main/java/org/gvsig/raster/lib/legend/impl/DefaultRasterLegend.java
DefaultRasterLegend.java | ||
---|---|---|
237 | 237 |
|
238 | 238 |
interpolated = |
239 | 239 |
bufferToDraw.createInterpolated((int) Math.floor(heightPixel), |
240 |
(int) Math.floor(widthPixel), Buffer.INTERPOLATION_BicubicSpline, taskStatus);
|
|
240 |
(int) Math.floor(widthPixel), Buffer.INTERPOLATION_Bilinear, taskStatus);
|
|
241 | 241 |
bufferToDraw = interpolated; |
242 | 242 |
} catch (BufferException e) { |
243 | 243 |
LOG.warn( |
244 | 244 |
"Buffer can not be interpolated with [rows: {} , columns: {}, method: {}]", |
245 | 245 |
new String[] { String.valueOf((int) Math.floor(heightPixel)), |
246 | 246 |
String.valueOf((int) Math.floor(widthPixel)), |
247 |
String.valueOf(Buffer.INTERPOLATION_BicubicSpline) });
|
|
247 |
String.valueOf(Buffer.INTERPOLATION_Bilinear) });
|
|
248 | 248 |
taskStatus.abort(); |
249 | 249 |
return; |
250 | 250 |
} |
... | ... | |
480 | 480 |
for (int i = 0; i < bufferToDraw.getRows(); i++) { |
481 | 481 |
for (int j = 0; j < bufferToDraw.getColumns(); j++) { |
482 | 482 |
|
483 |
int alphaByteValue = 255;
|
|
483 |
int alphaByteValue = 0;
|
|
484 | 484 |
int redByteValue = 0; |
485 | 485 |
if(redBand!=null){ |
486 | 486 |
Number redValue = (Number) redBand.get(i, j); |
487 | 487 |
NoData noData = redBand.getNoData(); |
488 | 488 |
if(noData != null){ |
489 | 489 |
if(redValue.equals(noData.getValue())){ |
490 |
alphaByteValue = 0; |
|
490 |
alphaByteValue = 0 | alphaByteValue;
|
|
491 | 491 |
redByteValue = 0; |
492 | 492 |
} else { |
493 | 493 |
alphaByteValue = 255; |
... | ... | |
503 | 503 |
NoData noData = greenBand.getNoData(); |
504 | 504 |
if(noData != null){ |
505 | 505 |
if(greenValue.equals(noData.getValue())){ |
506 |
alphaByteValue = (alphaByteValue!=0)?255:0;
|
|
506 |
alphaByteValue = 0 | alphaByteValue;
|
|
507 | 507 |
greenByteValue = 0; |
508 | 508 |
} else { |
509 | 509 |
alphaByteValue = 255; |
... | ... | |
519 | 519 |
NoData noData = blueBand.getNoData(); |
520 | 520 |
if(noData != null){ |
521 | 521 |
if(blueValue.equals(noData.getValue())){ |
522 |
alphaByteValue = (alphaByteValue!=0)?255:0;
|
|
522 |
alphaByteValue = 0 | alphaByteValue;
|
|
523 | 523 |
blueByteValue = 0; |
524 | 524 |
} else { |
525 | 525 |
alphaByteValue = 255; |
Also available in: Unified diff