Revision 2308 org.gvsig.raster.lizardtech/branches/org.gvsig.raster.lizardtech_dataaccess_refactoring/org.gvsig.raster.lizardtech.io/src/main/java/org/gvsig/raster/lizardtech/io/LizardTechProvider.java
LizardTechProvider.java | ||
---|---|---|
457 | 457 |
|
458 | 458 |
public DataStoreTransparency getTransparency() { |
459 | 459 |
if (fileTransparency == null) |
460 |
fileTransparency = new DataStoreTransparency(); |
|
460 |
fileTransparency = new DataStoreTransparency(getColorInterpretation());
|
|
461 | 461 |
return fileTransparency; |
462 | 462 |
} |
463 | 463 |
|
464 | 464 |
public DataStoreColorInterpretation getColorInterpretation() { |
465 |
if (colorInterpr == null) {
|
|
465 |
if(colorInterpr == null) { |
|
466 | 466 |
colorInterpr = new DataStoreColorInterpretation(); |
467 | 467 |
colorInterpr.initColorInterpretation(getBandCount()); |
468 |
if (getBandCount() == 1) |
|
469 |
colorInterpr.setColorInterpValue(0, DataStoreColorInterpretation.GRAY_BAND); |
|
470 |
if (getBandCount() >= 3) { |
|
471 |
colorInterpr.setColorInterpValue(0, DataStoreColorInterpretation.RED_BAND); |
|
472 |
colorInterpr.setColorInterpValue(1, DataStoreColorInterpretation.GREEN_BAND); |
|
473 |
colorInterpr.setColorInterpValue(2, DataStoreColorInterpretation.BLUE_BAND); |
|
468 |
if(getBandCount() == 1) |
|
469 |
colorInterpr = DataStoreColorInterpretation.createGrayInterpretation(); |
|
470 |
if(getBandCount() == 3) { |
|
471 |
colorInterpr = DataStoreColorInterpretation.createRGBInterpretation(); |
|
474 | 472 |
} |
473 |
if(getBandCount() >= 4) { |
|
474 |
colorInterpr = DataStoreColorInterpretation.createARGBInterpretation(); |
|
475 |
} |
|
475 | 476 |
} |
476 | 477 |
return colorInterpr; |
477 | 478 |
} |
Also available in: Unified diff