How to clone a java.awt.BufferedImage?
807599Apr 26 2007 — edited May 11 2008private BufferedImage originalImage;
private BufferedImage copiedImage;
public MyClass(BufferedImage image) {
originalImage = image;
copiedImage= originalImage .clone();
}
The issue is that BufferedImage.clone does not exist.
When I just do this:
copiedImage= originalImage;
then when I modify the copied image I am also modifying the orriginal.
I know I am dealing with a pointer with the BufferedImage, but I am not sure how to get around it at this point.
Thanks,
Justus