<p>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 managed way to do this with GDI+?</p>

<p>I need to use GDI+, not WPF.  I'd prefer to have a managed solution, but if it is not available, I guess PInkvoke will have to suffice.</p>

[{'answer_id': 38396, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 3, 'selected': True, 'text': '<p>There are a number of solutions.</p>\n<ol>\n<li>For GDI+, <a href="https://web.archive.org/web/20090224151626/http://support.microsoft.com/kb/317825/" rel="nofollow noreferrer">check out this article at MSDN</a> (HOW TO: Use GDI+ and Image Color Management to Adjust Image Colors).</li>\n<li>For WPF (.NET 3.0), see the <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.color.colorcontext(VS.85).aspx" rel="nofollow noreferrer">System.Windows.Media</a> namespace. There are a number of different classes, such as the <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapencoder.aspx" rel="nofollow noreferrer">BitmapEncoder</a>, that have the concept of a <a href="http://msdn.microsoft.com/en-us/library/system.windows.media.colorcontext.aspx" rel="nofollow noreferrer">ColorContext</a>, which &quot;Represents the International Color Consortium (ICC) or Image Color Management (ICM) color profile that is associated with a bitmap image.&quot;</li>\n</ol>\n<p>Both of these seem pretty complex, so there\'s always the option of buying somebody else\'s code.  Atalasoft\'s <a href="http://www.atalasoft.com/products/dotimage/photopro/default.aspx" rel="nofollow noreferrer">DotImage Photo Pro</a> 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.</p>\n'}, {'answer_id': 157540, 'author': 'mattlant', 'author_id': 14642, 'author_profile': 'https://Stackoverflow.com/users/14642', 'pm_score': 1, 'selected': False, 'text': '<p>You should take a look at <a href="http://www.littlecms.com/" rel="nofollow noreferrer">Lcms</a>. 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.</p>\n'}]
['https://Stackoverflow.com/questions/38295', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3798/']