Adding two BufferedImages without painting on screen?
843805May 3 2007 — edited Nov 27 2007Hi all,
I am trying to combine two (or more) BufferedImages into onee BufferedImage, such that the result is a BufferedImage that represents all the images laid out side-by-side. (If I get a result for two images I can work out multiple images by myself)
This would be quite simple if I were interested in displaying the images, as I could extend a JPanel or JLabel or whatever, and modify the paint() or paintComponent() method to paint out all the BufferedImages. I could then use this to create a new BufferedImage if I wanted.
However, I want to be able to create a BufferedImage (or a Byte Array) without ever needing to paint the images on the screen. I need to be able to save the resulting BufferedImage/byet[] without needing to pop up a little panel to paint on.
Is there any way to do this?
Thanks!
Sam