Revision 2423 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
271 271
	public ColorInterpretation getColorInterpretation() {
272 272
		if(super.getColorInterpretation() == null) {
273 273
			ColorInterpretation colorInterpretation = new DataStoreColorInterpretation(getBandCount());
274
			if(getBandCount() == 1)
274
			if(getBandCount() == 1 || getBandCount() == 2)
275 275
				colorInterpretation = DataStoreColorInterpretation.createGrayInterpretation();
276 276
			if(getBandCount() == 3)
277 277
				colorInterpretation = DataStoreColorInterpretation.createRGBInterpretation();
......
698 698

  
699 699
		RasterQuery q = RasterLocator.getManager().createQuery();
700 700
		q.setAreaOfInterest();
701
		q.setAllDrawableBands();
701
		q.setDrawableBands(getColorInterpretation().buildRenderBands());
702
		if(store.getBandCount() > 3)
703
			q.forceARGBRequest();
704
		else 
705
			q.forceRGBRequest();
706
		
702 707
		Buffer buf = store.query(q);
703 708

  
704 709
		store.close();

Also available in: Unified diff