Hi guys,

I want to paint multiple layers of images onto one image. I'm going to be using BufferedImage for this.

How would I go about painting these multiple images onto one (in essence creating a new image. sort of like a collage)?

Would i get the graphics context and then paint to the BufferedImage?

Recommended Answers

All 3 Replies

Depends, if you mean taking certain elements from images and putting them together in one image, you'll have to find a way to isolate the pixels needed from the images and transfer the pixels over into the other image. You'll also have to take image size into account with this (hopefully you only want one size throughout, that makes it easier). If you want to take the images and combine the pixels into some strange mixed/artistic sort of development, you'll get the color values from each pixel, add them, then set the value to the pixel in the new image. I'm a little rusty on the coding, so I would have to look it up, but does this help any?

commented: Gave a substantial answer +2

Thanks very much poeticinsanity. I wasn't sure if it would work, but it does. Thank you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.