Meet us at PRINT 19. Chicago, IL. Oct. 3 - 5.
This documentation is for the old version. Go to the latest Graphics Mill docs

ColorManagementProvider Class

This class contains methods and properties used by Bitmap to provide color management and color conversion.

Namespace: Aurigma.GraphicsMill
Assembly: Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)

Syntax

Visual Basic
Public Class ColorManagementProvider _
	Inherits LockableObject
C#
public class ColorManagementProvider : LockableObject

Remarks

This class is accessible from ColorManagement property of Bitmap. You should use it if you need Bitmap to apply color management during color conversions, drawing, and other operations where it is applicable.

To choose the color management engine, you should use property ColorManagementEngine. You can specify such color management parameters as output profiles for each color space (CmykColorProfile, GrayScaleColorProfile, RgbColorProfile properties), profile for target device to produce chain color management (TargetColorProfile property). A color management intent parameter is accessible through TransformationIntent property.

After you set color management up, you can apply color conversions. This class applies two different kinds of color conversion: conversion to indexed pixel formats (color reduction) and conversion to continuous ones.

Examples

This sample reduces the number of colors to 64:

Visual Basic
Dim bitmap As New Aurigma.GraphicsMill.Bitmap("c:\parrot.jpg")
bitmap.ColorManagement.Dithering = Aurigma.GraphicsMill.Transforms.DitheringType.FloydSteinberg
bitmap.ColorManagement.DitheringIntensity = 1
bitmap.ColorManagement.PaletteEntryCount = 64
bitmap.ColorManagement.ConvertToIndexed(8, Aurigma.GraphicsMill.ColorPaletteType.Adaptive, _
 Nothing)
bitmap.Save("c:\Gif64ErrorDiffusion.gif")
C#
Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap(@"c:\parrot.jpg");
bitmap.ColorManagement.Dithering = Aurigma.GraphicsMill.Transforms.DitheringType.FloydSteinberg;
bitmap.ColorManagement.DitheringIntensity = 1;
bitmap.ColorManagement.PaletteEntryCount = 64;
bitmap.ColorManagement.ConvertToIndexed(8, Aurigma.GraphicsMill.ColorPaletteType.Adaptive, null);        
bitmap.Save(@"c:\Gif64ErrorDiffusion.gif");

Here is a code which applies the conversion between RGB and CMYK:

Visual Basic
Dim bitmap As New Aurigma.GraphicsMill.Bitmap

'Choose LittleCMS color management engine
bitmap.ColorManagement.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms

'Load RGB image without embedded ICM profile from file
bitmap.Load("C:\Flower.jpg")

'Assign input sRGB profile
bitmap.ColorProfile = Aurigma.GraphicsMill.ColorProfile.FromSrgb

'Assing output CMYK profile for conversion
bitmap.ColorManagement.CmykColorProfile = New Aurigma.GraphicsMill.ColorProfile( _
 "C:\windows\system32\spool\drivers\color\EuroscaleCoated.icc")

'Convert to CMYK
bitmap.ColorManagement.ConvertToContinuous( _
 Aurigma.GraphicsMill.ColorSpace.Cmyk, False, bitmap.IsExtended)
C#
Aurigma.GraphicsMill.Bitmap bitmap = new Aurigma.GraphicsMill.Bitmap();

//Choose LittleCMS color management engine
bitmap.ColorManagement.ColorManagementEngine = Aurigma.GraphicsMill.Transforms.ColorManagementEngine.LittleCms;

//Load RGB image without embedded ICM profile from file
bitmap.Load(@"C:\Flower.jpg");

//Assign input sRGB profile
bitmap.ColorProfile = Aurigma.GraphicsMill.ColorProfile.FromSrgb();

//Assing output CMYK profile for conversion
bitmap.ColorManagement.CmykColorProfile = new Aurigma.GraphicsMill.ColorProfile( 
    @"C:\windows\system32\spool\drivers\color\EuroscaleCoated.icc");

//Convert to CMYK
bitmap.ColorManagement.ConvertToContinuous( 
    Aurigma.GraphicsMill.ColorSpace.Cmyk, false, bitmap.IsExtended);

Inheritance Hierarchy

System.Object
L Aurigma.GraphicsMill.LockableObject
L Aurigma.GraphicsMill.ColorManagementProvider

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.

Object Model







See Also

Reference