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.
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:
Image Magick Command-Line Profile Options
I hope this helps.