This is what I am trying to do... I have a image and I create a bufferedImage and graphics out of that using:
BufferedImage img = ImageIO.read(file);
Graphics2D g = img.createGraphics();
Now I play with the graphics and finally save the file using:
File outputfile = new File(outfilename);
ImageIO.write(img, "png", outputfile);
Now the problem is I want to go in two different directions with the present graphics that I have...for that I need to copy graphics so that I can make different changes on them..like this
myImageFile -> Image1 ->(image2, image3)
.here I am confused if I copy the BufferedImage or the graphics?
To copy the graphics I did,
Graphics2D gIssue = (Graphics2D) g.create();
But this does not work as when I make "the image3", it shows stuffs that I included in "image2" when what I want is it should not have graphicsChanges that occured when image1 was converted to image2.
I hope I did not confuse folks here...
Thanks in Advance! Any help/advice/suggestions is greatly appreciated!