确定图像中的颜色配置文件 [英] Determine color profile in an image
问题描述
我正在研究一个使用WPF操纵图像的项目.操作示例包括缩放,裁剪,更改像素格式,嵌入颜色配置文件.
I'm working on a project that manipulates images by using WPF. Samples of manipulation is scaling, cropping, changing pixel format, embedding color profiles.
在加载嵌入了AdobeRGB配置文件的jpg文件时,我遇到了问题.当我尝试读取此类图像上的嵌入式颜色配置文件时,我获得了具有两个配置文件(BitmapFrame.ColorContexts)的集合. ColorContext类 没有提供有关它是哪个配置文件的任何信息,我也不知道这两个配置文件中哪个是在映像中使用的配置文件.如果要使用ColorConvertedBitmap进行转换,则需要指定输入配置文件.
I have run into a problem when loading jpg files that has AdobeRGB profile embedded. When I try to read the embedded color profiles on such an image, I get a collection with two profiles (BitmapFrame.ColorContexts). The ColorContext class doesn't provide any information about which profile it is, and I have no idea which of the two profiles that is the one in use on the image. If I'm to do transformations with ColorConvertedBitmap i need to specify the input profile.
所以,我的问题是:
1.为什么在框架上返回两个嵌入式ColorContext?
1. Why are there two embedded ColorContexts returned on the frame?
2.如何获取有关ColorContext的信息(它使用哪种像素格式,配置文件的名称等)?
2. How do I get information about the ColorContext (which pixel format it uses, what is the name of the profile, etc.) ?
3.如何确定使用的两个ColorContext中的哪个?
3. How can I determine which of the two ColorContext that is the one in use?
谢谢
Tor-Odd
Tor-Odd Connelly
Tor-Odd Connelly
推荐答案
I也希望看到这个问题的答案.我一直无法使用嵌入式ColorContext并发现文档非常不清楚:
I'd like to see an answer to this question as well. I've been unable to use the embedded ColorContext and find the documentation very unclear:
http://social.msdn.microsoft .com/Forums/zh-CN/wpf/thread/acd05a17-38b8-4def-8ff2-dbfcd5cd1ef1
这篇关于确定图像中的颜色配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!