ColorConverter Class

Applies color conversion to an image.

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

Syntax

C#
public sealed class ColorConverter : Transform

Remarks

This class should be used for appling color management during color conversions, drawing, and other operations where it is applicable. To choose the color management engine, use the ColorManagementEngine property. You can specify such color management parameters as a default input profile (DefaultSourceProfile), output profile (DestinationProfile property), and profile for target device (TargetDeviceProfile property). A color management intent parameter is accessible through the 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

C#
using (var reader = new JpegReader(@"Images\cmyk.jpg"))
using (var converter = new ColorConverter(PixelFormat.Format24bppRgb))
using (var writer = new JpegWriter(@"Images\Output\out.jpg"))
{
    converter.ColorManagementEngine = ColorManagementEngine.LittleCms;
    converter.DefaultSourceProfile = new ColorProfile(@"_Input\ColorProfiles\EuroscaleCoated.icc");
    converter.DestinationProfile = ColorProfile.FromSrgb();
    Pipeline.Run(reader + converter + writer);
}

Inheritance Hierarchy

System.Object
L Aurigma.GraphicsMill.PipelineElement
L Aurigma.GraphicsMill.Transforms.Transform
L Aurigma.GraphicsMill.Transforms.ColorConverter

Thread Safety

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

See Also

Reference

Manual