如何从java小程序视觉输出创建图像?

发布于 2024-11-14 02:15:41 字数 142 浏览 7 评论 0原文

有没有办法从java小程序的视觉输出中创建图像? 或者,一个 RGB 值数组就足够了。

它需要类似于 Java Robot 类的“createScreenCapture(Rectangle screenRect)”,只不过它需要在小程序不可见时也能工作。

Is there anyway to create an image from the visual output of a java applet?
Alternatively, an array of rgb values would suffice.

It needs to be similar to Java Robot class' "createScreenCapture(Rectangle screenRect)" except it needs to work even when the applet is not visible.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

A君 2024-11-21 02:15:41

只需使用 ImageIO.write(...); 保存缓冲区即可

您正在使用缓冲区吗?

如果您发布源代码,我会为您编写一个 saveOutput() 方法

simply save the buffer with ImageIO.write(...);

You are using a buffer right?

if you post the source ill write a saveOutput() method for you

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文