- Aurigma Graphics Mill 5.5 for .NET
- Introduction
- What's New?
- Overview of Features
- Getting Started
- Programming with Graphics Mill for .NET
- Image Processing with Graphics Mill for .NET
- Loading and Saving Images
- Working with Metadata
- Drawing
- Applying Effects
- Color Conversion
- Basic Concepts of Color Management
- Using Adobe Color Management Module with Graphics Mill for .NET
- Using Color Management in Graphics Mill for .NET
- Loading and Saving Files with ICC Profiles
- Converting Colors with Color Management
- Displaying Images with Color Management
- Basic Concepts of Color Reduction
- Color Reduction for Web
- Preserving Transparency During Color Reduction
- Imaging Concepts
- Red-Eye Removal
- Using Graphics Mill for .NET in Windows Applications
- Using Graphics Mill for .NET in Web Applications
- FAQ: Using Graphics Mill for .NET
- Image Processing with Graphics Mill for .NET
- File Formats
- Graphics Mill for .NET Add-ons
- Class Library Reference
- Samples
- Licensing
- Copyright Notices
Displaying Images with Color Management
This topic explains how to use color management features of Graphics Mill for .NET when displaying an image on the screen.
Displaying Images on Monitor with Color Management
Usually, Graphics Mill for .NET displays an image with color management automatically. If an image has the embedded color profile (available through the ColorProfile property of the Bitmap class), BitmapViewer control or the Draw method will automatically apply color management. However, under some circumstances, color management is not applied. The reason may be one of the following:
Color management is disabled, the ColorManagementEngine property of the ColorManagementProvider returned by the Bitmap class instance is None.
In this case just set it to LittleCms or AdobeCmm to specify color management engine.
BitmapViewer1.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms
'or
BitmapViewer1.Bitmap.ColorManagement.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms
BitmapViewer1.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms;
//or
BitmapViewer1.Bitmap.ColorManagement.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms;
Bitmap does not contain the embedded color profile. This can happen if the original file did not contain a profile at all or you are getting an image in a way other than loading it from file (for example using the Create method). In this case the profile should be assigned through the ColorProfile property:
BitmapViewer1.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms
BitmapViewer1.Bitmap.Load("c:\mountain.jpg")
If BitmapViewer1.Bitmap.ColorManagement.RgbColorProfile Is Nothing Then
BitmapViewer1.Bitmap.ColorProfile = _
New Aurigma.GraphicsMill.ColorProfile("c:\sRGB Color Space Profile.icm")
End If
BitmapViewer1.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms;
BitmapViewer1.Bitmap.Load(@"c:\mountain.jpg");
if (BitmapViewer1.Bitmap.ColorManagement.RgbColorProfile == null)
{
BitmapViewer1.Bitmap.ColorProfile =
new Aurigma.GraphicsMill.ColorProfile(@"c:\sRGB Color Space Profile.icm");
}
Previewing Images as They Would Appear on the Target Device
When preparing image for printing, it would be useful to be able to preview how it will actually look on the hardcopy. To achieve this, you should specify the profile of the target device using the TargetColorProfile property. Graphics Mill for .NET will apply the color management bearing both profiles in mind. This property usage is demonstrated in this code example:
BitmapViewer1.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms
BitmapViewer1.Bitmap.Load("c:\Horses.jpg")
BitmapViewer1.Bitmap.ColorManagement.RgbColorProfile = _
New Aurigma.GraphicsMill.ColorProfile("c:\sRGB Color Space Profile.icm")
BitmapViewer1.Bitmap.ColorManagement.TargetColorProfile = _
New Aurigma.GraphicsMill.ColorProfile("c:\hpcljtps.icm")
BitmapViewer1.Bitmap.ColorManagement.Convert(Aurigma.GraphicsMill.PixelFormat.Format24bppRgb)
BitmapViewer1.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms;
BitmapViewer1.Bitmap.Load(@"c:\Horses.jpg");
BitmapViewer1.Bitmap.ColorManagement.RgbColorProfile =
new Aurigma.GraphicsMill.ColorProfile(@"c:\sRGB Color Space Profile.icm");
BitmapViewer1.Bitmap.ColorManagement.TargetColorProfile =
new Aurigma.GraphicsMill.ColorProfile(@"c:\hpcljtps.icm");
BitmapViewer1.Bitmap.ColorManagement.Convert(Aurigma.GraphicsMill.PixelFormat.Format24bppRgb);