Applies color conversion to an image.
Namespace:
Aurigma.GraphicsMill.Transforms
Assembly:
Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
public sealed class ColorConverter : Transform
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.
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); }