在java中读取jpeg2000文件 [英] read jpeg2000 files in java

查看:170
本文介绍了在java中读取jpeg2000文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用包含图像jpeg2000字节的byte []的代码。我想在jLabel组件中显示如何做到这一点?任何人都有想法或代码吗?

I have a code using a byte[] that contains a image jpeg2000 bytes. I want show this in jLabel component howto do this? Anyone have idea or code to do?

推荐答案

你会这样做吗

Image img = ImageIO.read(new ByteArrayInputStream(imageBytes));
ImageIcon imgIcon = new ImageIcon(img);

JLabel label = new JLabel(imgIcon);

JPG2000 解码器不提供​​标准SDK,你应该请此处(Java高级成像)并使用适合该格式的正确解码器。

but the JPG2000 decoder isn't supplied with standard SDK, you should head here (Java Advanced Imaging) and use the right decoder for that format..

这篇关于在java中读取jpeg2000文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆