Image now properly copied onto the destination, rather than the other way around...

This commit is contained in:
Harald Kuhr 2016-02-18 18:07:50 +01:00
parent a1de9ff448
commit 2955054a72

View File

@ -358,8 +358,9 @@ public final class ImageUtil {
} }
/** /**
* Creates a copy of the given image. The image will have the same * Creates a deep copy of the given image. The image will have the same
* color model and raster type, but will not share image (pixel) data. * color model and raster type, but will not share image (pixel) data
* with the input image.
* *
* @param pImage the image to clone. * @param pImage the image to clone.
* *
@ -378,7 +379,7 @@ public final class ImageUtil {
cm.createCompatibleWritableRaster(pImage.getWidth(), pImage.getHeight()), cm.createCompatibleWritableRaster(pImage.getWidth(), pImage.getHeight()),
cm.isAlphaPremultiplied(), null); cm.isAlphaPremultiplied(), null);
drawOnto(pImage, img); drawOnto(img, pImage);
return img; return img;
} }