Revision 2308 org.gvsig.raster.ermapper/branches/org.gvsig.raster.ermapper_dataaccess_refactoring/org.gvsig.raster.ermapper.io/src/main/java/org/gvsig/raster/ermapper/io/ErmapperProvider.java
ErmapperProvider.java | ||
---|---|---|
270 | 270 |
|
271 | 271 |
public Transparency getTransparency() { |
272 | 272 |
if(fileTransparency == null) |
273 |
fileTransparency = new DataStoreTransparency(); |
|
273 |
fileTransparency = new DataStoreTransparency(getColorInterpretation());
|
|
274 | 274 |
return fileTransparency; |
275 | 275 |
} |
276 | 276 |
|
... | ... | |
738 | 738 |
public void refreshUpdate(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5) { |
739 | 739 |
} |
740 | 740 |
|
741 |
public DataStoreColorInterpretation getColorInterpretation(){ |
|
741 |
public DataStoreColorInterpretation getColorInterpretation() {
|
|
742 | 742 |
if(colorInterpr == null) { |
743 | 743 |
colorInterpr = new DataStoreColorInterpretation(); |
744 | 744 |
colorInterpr.initColorInterpretation(getBandCount()); |
745 | 745 |
if(getBandCount() == 1) |
746 |
colorInterpr.setColorInterpValue(0, DataStoreColorInterpretation.GRAY_BAND); |
|
747 |
if(getBandCount() >= 3) { |
|
748 |
colorInterpr.setColorInterpValue(0, DataStoreColorInterpretation.RED_BAND); |
|
749 |
colorInterpr.setColorInterpValue(1, DataStoreColorInterpretation.GREEN_BAND); |
|
750 |
colorInterpr.setColorInterpValue(2, DataStoreColorInterpretation.BLUE_BAND); |
|
746 |
colorInterpr = DataStoreColorInterpretation.createGrayInterpretation(); |
|
747 |
if(getBandCount() == 3) { |
|
748 |
colorInterpr = DataStoreColorInterpretation.createRGBInterpretation(); |
|
751 | 749 |
} |
750 |
if(getBandCount() >= 4) { |
|
751 |
colorInterpr = DataStoreColorInterpretation.createARGBInterpretation(); |
|
752 |
} |
|
752 | 753 |
} |
753 | 754 |
return colorInterpr; |
754 | 755 |
} |
Also available in: Unified diff