指定的ICC色彩描述文件在C#中的图像 [英] Assign an ICC Color Profile to an image in C#

查看:1215
本文介绍了指定的ICC色彩描述文件在C#中的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

总之:我想一个ICC色彩配置文件分配给一个图像,而不是其应用

In short: I want to assign a ICC color profile to an image and not apply it.

更多信息: 在我的公司,我们需要合并多个分层PDF文件转换成一个层。要做到这一点,我们合并PDF页面到一个图像,然后将图像保存为PDF。但是在产生图像的图像的颜色分​​布图的过程会丢失。如果我们将颜色配置文件在C#中的配置文件将改变从设备RGB(.NET的默认输出) sRGB_IEC61966-2-1_no_black_scaling.icc 轮廓。在改造一些颜色变化。运用色彩配置文件,而不是我们需要指定它。这意味着没有色彩变换。

More info: In my company we need to merge a multiple layered pdf file into one layer. To do this we merge the pdf page into an image and then save the image as a pdf. But in the process of creating the image the color profile of the image gets lost. If we Apply the color profile in C# the profile will transform from Device RGB (default output of .NET) to the sRGB_IEC61966-2-1_no_black_scaling.icc profile. In the transformation some colors change. Instead of applying the color profile we need to assign it. Meaning that no colors are transformed.

有谁知道如何实现这一目标?先谢谢了。

Does anyone know how to achieve this? Thanks in advance.

推荐答案

在你开始工作,你的位图(即你开始了单独的PDF组件的布局之前),确保位图具有应用目标ICC配置文件。你说你的单张图像嵌入他们所需要的个人资料,这是迷失在转型。要保留配置文件,确保您使用下面的加载方法,它尊重任何颜色配置文件信息:

Before you start working on your bitmap (i.e. before you commence the layout of the individual PDF components), ensure that the bitmap has your target ICC profile applied. You say that your individual pictures have the required profile embedded within them, and this is being lost in the transformation. To retain the profile, ensure that you use the following load method, which respects any colour profile info:

http://msdn.microsoft.com/en-us/library/ 4sahykhd.aspx

您可以使用此第一个位图作为目标的合成工作,然后再导出。它应该保留原来的ICC配置文件。

You can use this first bitmap as the target for your composition work, then export it later. It should retain the original ICC profile.

另外,你可以使用FreeImage的或ImageMagick的库来显式管理色彩配置文件。他们都有.NET包装,并允许剥离/应用的ICC配置文件:

Alternatively, you can use the FreeImage or ImageMagick libraries to manage colour profiles explicitly. They both have .NET wrappers and allow for stripping/applying of ICC profile files:

免费图片库

难懂的命令行配置文件选项

难懂.NET包装

我希望这有助于。

这篇关于指定的ICC色彩描述文件在C#中的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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