Rgb To Cmyk color space conversion
View as MarkdownConverts color space from RGB to CMYK with color management.
Code Snippet
using (var bitmap = new Bitmap("Copenhagen_RGB.jpg"))
{
if (bitmap.ColorProfile == null)
{
bitmap.ColorProfile = ColorProfile.FromSrgb();
}
bitmap.ColorManagement.DestinationProfile = new ColorProfile("ISOcoated_v2_eci.icc");
bitmap.ColorManagement.TransformationIntent = ColorTransformationIntent.Perceptual;
bitmap.ColorManagement.Convert(PixelFormat.Format32bppCmyk);
bitmap.Save("RgbToCmykWithColorManagement.jpg");
}
Input
Copenhagen_RGB.jpg
ISOcoated_v2_eci.icc
DownloadOutput
RgbToCmykWithColorManagement.jpg
Used APIs
- Aurigma.GraphicsMill.Bitmap.ColorManagement
- Aurigma.GraphicsMill.Bitmap.ColorProfile
- Aurigma.GraphicsMill.ColorManagementProvider.Convert(PixelFormat)
- Aurigma.GraphicsMill.ColorManagementProvider.DestinationProfile
- Aurigma.GraphicsMill.ColorManagementProvider.TransformationIntent
- Aurigma.GraphicsMill.ColorProfile
- Aurigma.GraphicsMill.ColorProfile.FromSrgb
- Aurigma.GraphicsMill.Transforms.ColorTransformationIntent