简体   繁体   English

Java BufferedImage增加宽度

[英]Java BufferedImage increase width

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 existing one? 还是我必须创建一个新的空白图像并插入现有的空白图像?

Thanks 谢谢

是的,您需要创建一个新的缓冲图像并在新的较大图像之上绘制现有图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM