Assign color profile to ICC image in C #

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

Additional information: In my company we need to combine a multilayer PDF file into one layer. To do this, we combine the PDF page into an image, and then save the image in pdf format. But in the process of creating an image, the color profile of the image is lost. If we apply the color profile in C #, the profile is converted from Device RGB (the default output is .NET) to sRGB_IEC61966-2-1_no_black_scaling.icc . During transformation, some colors change. Instead of applying a color profile, we need to assign it. This means that no colors are converted.

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

+6
source share
1 answer

Before you begin working on your bitmap (that is, before starting to lay out individual PDF components), make sure that the bitmap has the target ICC profile. You say that your individual photos have the necessary profile built into them, and this is lost when converting. To save the profile, make sure you use the following download method that matches any color profile information:

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

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

Alternatively, you can use the FreeImage or ImageMagick libraries to manage color profiles explicitly. Both of them have .NET wrappers and allow you to delete / apply ICC profile files:

Free image library

Magician Command Line Profile Options

Image of Magick.NET Wrapper

Hope this helps.

+6
source

Source: https://habr.com/ru/post/908695/


All Articles