Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Adding two BufferedImages without painting on screen?

843805May 3 2007 — edited Nov 27 2007
Hi 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 25 2007
Added on May 3 2007
4 comments
507 views