int minY = sourceRegion.y / scaleY;
int w = (sourceRegion.width + scaleX - 1) / scaleX;
int h = (sourceRegion.height + scaleY - 1) / scaleY;
Rectangle destinationRegion = new Rectangle(minX, minY, w, h);
sampleModel = sampleModel.createCompatibleSampleModel(w, h);
SampleModel destSM= sampleModel;
// If the data are not formatted nominally then reformat.
if(sampleModel.getDataType() != DataBuffer.TYPE_BYTE ||