Revision 28488 branches/v2_0_0_prep/libraries/libRaster_io/src/org/gvsig/fmap/dal/coverage/dataset/io/ErmapperDriver.java

View differences:

ErmapperDriver.java
415 415

  
416 416
			}*/
417 417

  
418
			if(bufWidth > Math.abs(selectedExtent.width()/file.cellIncrementX))
419
				bufWidth = (int)Math.abs(selectedExtent.width()/file.cellIncrementX);
420
			if(bufHeight > Math.abs(selectedExtent.height()/file.cellIncrementY))
421
				bufHeight = (int)Math.abs(selectedExtent.height()/file.cellIncrementY);
418
			if(bufWidth > Math.round(Math.abs(selectedExtent.width()/file.cellIncrementX)))
419
				bufWidth = (int)Math.round(Math.abs(selectedExtent.width()/file.cellIncrementX));
420
			if(bufHeight > Math.round(Math.abs(selectedExtent.height()/file.cellIncrementY)))
421
				bufHeight = (int)Math.round(Math.abs(selectedExtent.height()/file.cellIncrementY));
422 422
			file.setView(file.numBands, readBandsFromECW, selectedExtent.minX(), selectedExtent.maxY(), selectedExtent.maxX(), selectedExtent.minY(), bufWidth, bufHeight);
423

  
423
			
424 424
			//Escribimos el raster sobre un IBuffer
425 425
			int[] pRGBArray = new int[bufWidth];
426 426
			drawRGB(rasterBuf, pRGBArray, readBandsFromECW, bandList, task);

Also available in: Unified diff