heightDest = dy1 - dy2 + 1;
yDest = dy2;
}
// Extract the image with a CropImageFilter
final Image imageArea = new ToolkitImage(new FilteredImageSource(image.getSource(),
new CropImageFilter(xImage, yImage, widthImage, heightImage)));
if (bgColor == null) {
return drawImage(imageArea, xDest, yDest, widthDest, heightDest, observer);
} else {
return drawImage(imageArea, xDest, yDest, widthDest, heightDest, bgColor, observer);