如何使用 Java 和 NetBeans 将数据显示为图像

发布于 2024-08-22 21:54:22 字数 176 浏览 3 评论 0原文

我是 Java 和 NetBeans 新手,但有 C/C++ 经验。我将开发一个具有显示图像区域的应用程序。图像将在内存中创建为无符号字节数组,并被视为单色。

我正在寻找将此类数据显示为图像的教程或示例。 (数据将从成像辐射计中读取 - 每隔几秒)我已经查看了 AWT 中的一些类,但我需要一个示例。

谢谢

I am new to Java and NetBeans but have experience in C/C++. I will be working on an application which will have an area to display an image. The image will be created in memory as an array of unsigned bytes and considered to be monochrome.

I'm looking for a tutorial or examples of displaying data like this as an image. (The data will be read from an imaging radiometer - every few seconds) I've looked at some classes in AWT but I need an example.

Thanks

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

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

发布评论

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

评论(3

薄暮涼年 2024-08-29 21:54:22

这是一个直接操作离屏图像像素的简单示例。这个复杂示例检查了在单独的线程中累积图像数据并定期查看的几种方法更新。

Here's a very simple example of manipulating the pixels of an off-screen image directly. This more complex example examines several approaches to accumulating image data in a separate thread and viewing periodic updates.

妄司 2024-08-29 21:54:22

看起来你有两个问题。

  1. 从数组创建 java Image 对象:
    将像素数组转换为图像使用 Java 的 ImageIO 对象?

  2. 显示java图像:
    如何将图像添加到 JPanel?

有关使用 JPanel 渲染的更多信息可以在此处找到:
http://java.sun.com/docs/books/教程/uiswing/painting/index.html

It looks like you have two problems.

  1. Creating a java Image object from an array:
    Turn an array of pixels into an Image object with Java's ImageIO?

  2. Displaying the java Image:
    How to add an image to a JPanel?

More info on rendering with a JPanel can be found here:
http://java.sun.com/docs/books/tutorial/uiswing/painting/index.html

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