Hallo everyone. I'm just a newbe so please be patient .
I've a problem. I write Graphics Editor and I use BufferedImages as layers. I'd like to save a couple of BufferedImages' objects in one file. Moreover I'd like to move one BufferdImage object to another one - layers' integration.
Any ideas?
Thanks in advance.
Check out ImageIO#write to save your images.
How are you rendering your layers? Do all the layers share the same graphics object?
You might find this useful
http://blog.elevenworks.com/?p=2
OK, I've studied it. Unfortunately I haven't found the answer. The author uses similar way to mine with showing BufferdImage object, but he has only one BufferedImage object, he invokes createGraphics() on it and he gets the context to draw. Then he invokes g2.drawImage to show the object.
I can invoke g2.drawImage inside the "for loop" to show a few of BufferedImage's objects. It's OK, but the problem is when I want to save those objects to one JPG or PNG file. The static method of ImageIO takes only one BufferedImage object.