From 2955054a72adb445b41de8c0ffa4e51ff568e50b Mon Sep 17 00:00:00 2001 From: Harald Kuhr Date: Thu, 18 Feb 2016 18:07:50 +0100 Subject: [PATCH] Image now properly copied onto the destination, rather than the other way around... --- .../src/main/java/com/twelvemonkeys/image/ImageUtil.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/common-image/src/main/java/com/twelvemonkeys/image/ImageUtil.java b/common/common-image/src/main/java/com/twelvemonkeys/image/ImageUtil.java index 4298a88d..88fd7f1d 100644 --- a/common/common-image/src/main/java/com/twelvemonkeys/image/ImageUtil.java +++ b/common/common-image/src/main/java/com/twelvemonkeys/image/ImageUtil.java @@ -358,8 +358,9 @@ public final class ImageUtil { } /** - * Creates a copy of the given image. The image will have the same - * color model and raster type, but will not share image (pixel) data. + * 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 + * with the input image. * * @param pImage the image to clone. * @@ -378,7 +379,7 @@ public final class ImageUtil { cm.createCompatibleWritableRaster(pImage.getWidth(), pImage.getHeight()), cm.isAlphaPremultiplied(), null); - drawOnto(pImage, img); + drawOnto(img, pImage); return img; }