Apply an ICC Color Profile to an image in C# (Dotnet)

前端 未结 2 1934
耶瑟儿~
耶瑟儿~ 2021-01-06 17:33

How does one convert an image from one color profile to another (screen to printer, or scanner to screen). In Visual C++ you would use the function in ICM.h, is there a man

相关标签:
2条回答
  • 2021-01-06 17:52

    There are a number of solutions.

    1. For GDI+, check out this article at MSDN.
    2. For WPF (.NET 3.0), see the System.Windows.Media namespace. There are a number of different classes, such as the BitmapEncoder, that have the concept of a ColorContext, which "Represents the International Color Consortium (ICC) or Image Color Management (ICM) color profile that is associated with a bitmap image."

    Both of these seem pretty complex, so there's always the option of buying somebody else's code. Atalasoft's DotImage Photo Pro has ICC profile setting capabilities built in. The code is expensive; a dev license is almost 2k. But based on their participation in the dotnet community, I'd give them a whirl.

    0 讨论(0)
  • 2021-01-06 18:00

    You should take a look at Lcms. Its a colour management system, fairly complete, but written in C. you can use pinvoke, but I would recommend Managed C++ wrapper. I am actually currently working on a managed wrapper around the engine (just the basics, colour profile conversion, lab readings). I can post a link to the code after i am complete. It may be a week or so though.

    0 讨论(0)
提交回复
热议问题