简而言之:我想为图像分配 ICC 颜色配置文件而不是应用它。
更多信息:
在我的公司,我们需要将多层 pdf 文件合并为一层。为此,我们将 pdf 页面合并到图像中,然后将图像另存为 pdf。但在创建图像的过程中,图像的颜色配置文件会丢失。如果我们在 C# 中应用颜色配置文件,配置文件将从设备 RGB(.NET 的默认输出)转换为 sRGB_IEC61966-2-1_no_black_scaling.icc
配置文件。在转换过程中,一些颜色会发生变化。我们需要分配它,而不是应用颜色配置文件。这意味着没有颜色发生变化。
有谁知道如何实现这一目标?提前致谢。
In short: I want to assign a ICC color profile to an image and not apply it.
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.
发布评论
评论(1)
在开始处理位图之前(即在开始各个 PDF 组件的布局之前),请确保位图应用了您的目标 ICC 配置文件。您说您的个人照片中嵌入了所需的配置文件,而这些配置文件在转换中丢失了。要保留配置文件,请确保使用以下加载方法,该方法尊重任何颜色配置文件信息:
http://msdn.microsoft.com/en-us/library/4sahykhd.aspx
您可以使用此第一个位图作为合成工作的目标,然后稍后将其导出。它应保留原始 ICC 配置文件。
或者,您可以使用 FreeImage 或 ImageMagick 库来显式管理颜色配置文件。它们都有 .NET 包装器,并允许剥离/应用 ICC 配置文件:
免费图像库
Image Magick 命令行配置文件选项
Image Magick .NET Wrapper
我希望这会有所帮助。
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
You can use this first bitmap as the target for your composition work, then export it later. It should retain the original ICC profile.
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:
Free Image Library
Image Magick Command-Line Profile Options
Image Magick .NET Wrapper
I hope this helps.