如何获得java的jpeg / tiff的颜色空间? [英] How to get color space of a jpeg/tiff in java?

查看:393
本文介绍了如何获得java的jpeg / tiff的颜色空间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

标题总结起来真的。使用独立的exiftool程序将所有图像元数据转储到控制台我可以看到一行
颜色空间数据:RGB
看起来像是从ICC头中取得

the title sums it up really. Using the standalone exiftool program to dump all image metadata to a console I can see a line Color Space Data : RGB It looks like this is taken from the ICC-header

我想在java中编程获得相同的数据。我尝试了drew noakes库和Sanselan库,但是没有给任何字段的RGB值。

I want to get the same data programatically in java. I've tried the drew noakes library and the Sanselan library, but neither give me a value of RGB for any field.

推荐答案

你有一个 BufferedImage ,对吧?如果是这样,您可能需要 getType() getColorModel()(then。 getColorSpace()或。 toString())。您可以针对 BufferedImage 中定义的各种类型测试getType()。

You have a BufferedImage, right? If so, you probably want either getType() or getColorModel()(then .getColorSpace() or .toString()). You can test getType() against the various types defined in BufferedImage.

这篇关于如何获得java的jpeg / tiff的颜色空间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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