Graphics Mill for .NET allows using Adobe Color Management Module (CMM) as well as LittleCMS engine. This article reviews the Adobe CMM and shows how to use this module with Graphics Mill for .NET
Overview of Adobe Color Management Module
The Adobe CMM is the color conversion engine which allows transformation of colors using ICC (International Color Consortium) color profiles. This module is based on the Adobe Color Engine (ACE) and represented in a form which can be used by non-Adobe applications.
System Requirements
Adobe CMM requires Microsoft Windows XP with Service Pack 2, Windows Vista, or Windows Server 2003.
Usage Adobe Color Management Module with Graphics Mill for .NET
Before developing an application that uses Adobe CMM, this module must be installed on the development machine.
Installation
To install Adobe CMM on the development machine, perform the following steps:
- Download the Adobe CMM for Windows from http://www.adobe.com/support/downloads/detail.jsp?ftpID=3618;
- Unzip the downloaded file;
- Double-click the Setup.exe file to start the installer.
If the Adobe CMM is successfully installed on your development machine, you can use it with Graphics Mill for .NET.
Usage
To specify a color management engine, Graphics Mill for .NET provides the ColorManagementProvider.ColorManagementEngine and PixelFormatConverter.ColorManagementEngine properties. You need to set these properties to AdobeCmm value to enable Adobe CMM for color matching operations. However if you set AdobeCmm value, it is not guaranteed that this module will be used during color conversion operations because it should be installed on the machine where application is launched. To check whether Adobe CMM is available in the system you can use GlobalSettings.IsAdobeCmmAccessible property.
The following code sample demonstrates how to check whether the Adobe CMM is installed and use this module to convert pixels between CMYK and RGB.
| Visual Basic | Copy Code
|
|---|---|
Dim inputFile As String = "C:\Cmyk32.jpg"
Dim outputFile As String = "C:\Rgb24.jpg"
Dim bitmap As New Aurigma.GraphicsMill.Bitmap()
If (Aurigma.GraphicsMill.GlobalSettings.IsAdobeCmmAccessible) Then
bitmap.ColorManagement.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.AdobeCmm
Else
bitmap.ColorManagement.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms
End If
bitmap.Load(inputFile)
bitmap.ColorManagement.RgbColorProfile = Aurigma.GraphicsMill.ColorProfile.FromSrgb()
bitmap.ColorManagement.ConvertToContinuous(Aurigma.GraphicsMill.ColorSpace.Rgb, False, bitmap.IsExtended)
bitmap.Save(outputFile)
|
|
| C# | Copy Code
|
|---|---|
string inputFile = @"C:\Cmyk32.jpg";
string outputFile = @"C:\Rgb24.jpg";
Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap();
if (Aurigma.GraphicsMill.GlobalSettings.IsAdobeCmmAccessible)
bitmap.ColorManagement.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.AdobeCmm;
else
bitmap.ColorManagement.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms;
bitmap.Load(inputFile);
bitmap.ColorManagement.RgbColorProfile = Aurigma.GraphicsMill.ColorProfile.FromSrgb();
bitmap.ColorManagement.ConvertToContinuous(Aurigma.GraphicsMill.ColorSpace.Rgb, false, bitmap.IsExtended);
bitmap.Save(outputFile);
|
|
Redistribution
If the application is based on Graphics Mill for .NET and uses Adobe CMM for color conversion operations, you should guarantee that Adobe CMM is installed on users' systems. You need to tell about it in your documenation and consider to redistribute Adobe CMM along with your installation package.
Copy Code