Revision 2308 org.gvsig.raster.wms/branches/org.gvsig.raster.wms_dataaccess_refactoring/org.gvsig.raster.wms.io/src/main/java/org/gvsig/raster/wms/io/WMSProvider.java

View differences:

WMSProvider.java
269 269
	 */
270 270
	public ColorInterpretation getColorInterpretation() {
271 271
		if(super.getColorInterpretation() == null) {
272
			ColorInterpretation colorInterpretation = new DataStoreColorInterpretation();
273
			colorInterpretation.initColorInterpretation(getBandCount());
274
			colorInterpretation.setColorInterpValue(0, DataStoreColorInterpretation.RED_BAND);
275
			colorInterpretation.setColorInterpValue(1, DataStoreColorInterpretation.GREEN_BAND);
276
			colorInterpretation.setColorInterpValue(2, DataStoreColorInterpretation.BLUE_BAND);
272
			ColorInterpretation colorInterpretation = new DataStoreColorInterpretation(getBandCount());
273
			if(getBandCount() == 1)
274
				colorInterpretation = DataStoreColorInterpretation.createGrayInterpretation();
275
			if(getBandCount() == 3)
276
				colorInterpretation = DataStoreColorInterpretation.createRGBInterpretation();
277
			if(getBandCount() == 4)
278
				colorInterpretation = DataStoreColorInterpretation.createARGBInterpretation();
277 279
			setColorInterpretation(colorInterpretation);
278 280
		}
279 281
		return super.getColorInterpretation();
......
369 371
	
370 372
	public Transparency getTransparency() {
371 373
		if(fileTransparency == null)
372
			fileTransparency = new DataStoreTransparency();
374
			fileTransparency = new DataStoreTransparency(getColorInterpretation());
373 375
		return fileTransparency;
374 376
	}
375 377

  

Also available in: Unified diff