开发者

Combining several images in Java

I have these several images which I need to be combined using BufferedImage in java. The logi开发者_JAVA技巧c of the program is this: The user will be asked to input data (5 times) then the inputted value will be generated to image (I'm done coding with this part). My problem is how can I Combine them into one image only. Thanks!


You can create another new image. Depending on how you would like to combine the images you have two possibilities:

  1. Call getGraphics() on the newly create BufferedImage and use drawImage() multiple times to draw your other images into the newly created one (for example to create a tiled image with all the images you create beforehand)
  2. Call getRaster() on the newly create BufferedImage and use the methods of this object to draw information from your other images into this image (this way you can achieve any blend effects you might need)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜