- 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
This documentation is for the old version. Go to the latest Graphics Mill docs
Loading and Saving Files with ICC Profiles
Most of image formats allows storing an ICC profile inside the image file (JPEG, TIFF, PSD, etc). When Graphics Mill for .NET loads such files, it also load this profile. When you save file to these formats, Graphics Mill for .NET saves the profile with the file (if available).
After profile is loaded into the bitmap, you can use ColorProfile property of the Bitmap. This code example demonstrates this:
Visual Basic
Dim bitmap As New Aurigma.GraphicsMill.Bitmap
'Choose LittleCMS color management engine
bitmap.ColorManagement.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms
'Load CMYK image with embedded ICC profile from file
bitmap.Load("C:\Horses.jpg")
'Display location of the embedded profile
System.Windows.Forms.MessageBox.Show("ICC Profile is located here:" & vbNewLine & _
bitmap.ColorProfile.FileName)
C#
Aurigma.GraphicsMill.Bitmap bitmap =
new Aurigma.GraphicsMill.Bitmap();
//Choose LittleCMS color management engine
bitmap.ColorManagement.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms;
//Load CMYK image with embedded ICC profile from file
bitmap.Load(@"C:\Horses.jpg");
//Display location of the embedded profile
System.Windows.Forms.MessageBox.Show("ICC Profile is located here:" +
Environment.NewLine + bitmap.ColorProfile.FileName);
ColorProfile property can be also used to embed another profile into the image:
Visual Basic
Dim bitmap As New Aurigma.GraphicsMill.Bitmap
'Choose LittleCMS color management engine
bitmap.ColorManagement.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms
'Load CMYK image with embedded ICC profile from file
bitmap.Load("C:\Horses.jpg")
'Display location of the embedded profile
System.Windows.Forms.MessageBox.Show("ICC Profile is located here:" & vbNewLine & _
bitmap.ColorProfile.FileName)
C#
Aurigma.GraphicsMill.Bitmap bitmap =
new Aurigma.GraphicsMill.Bitmap(@"c:\Mountain.jpg");
//Choose LittleCMS color management engine
bitmap.ColorManagement.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms;
//Assign current sRGB profile
bitmap.ColorProfile = Aurigma.GraphicsMill.ColorProfile.FromSrgb();
//Save image with embedded color profile
bitmap.Save(@"c:\Mountain2.jpg",
new Aurigma.GraphicsMill.Codecs.JpegEncoderOptions());
Note
When you load the color profile into the Bitmap object, it is copied into the temporary
file (it is
true both for embedded profile and a profile loaded from the
.icc file). The lifetime of this temporary file is the same as a lifetime
of the Bitmap object. After Bitmap is disposed, the temporary file is
automatically deleted.