开发者

Java BufferedImage increase width

开发者 https://www.devze.com 2022-12-27 12:12 出处:网络
I have managed to load in an image using: BufferedImage image = ImageIO.read(out); and place text over it however, I want the text to appear next to the image. How can I increase the image width on

I have managed to load in an image using:

BufferedImage image = ImageIO.read(out);

and place text over it however, I want the text to appear next to the image. How can I increase the image width on the right to allow for space for the text to be drawn on. Or do I have to create a new empty image and insert the exi开发者_高级运维sting one?

Thanks


Yes, you need to create a new buffered image and draw your existing image on top of your new larger image.

0

精彩评论

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