LEADTOOLS Support
General
LEADTOOLS SDK Examples
HOW TO: C# Run Image Processing Commands on CMYK Image
#1
Posted
:
Thursday, January 23, 2020 4:59:02 PM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 105
Was thanked: 3 time(s) in 3 post(s)
When using the LoadCmykPlanes method, the image will load each plane onto a separate page. When running some image processing commands you need to run the command on each plane of the CMYK image. For more information on how to handle CMYK images see the below link:
https://www.leadtools.co...-as-separate-images.htmlAttached is a simple .NET Framework console application showcasing how to run image processing commands on a CMYK color space image.
Here are the relevant code snippets:
Code:
// Load CMYK Image
_image = _codecs.LoadCmykPlanes(sourceFile, 8, 1);
for (int i = 1; i <= _image.PageCount; i++)
{
_image.Page = i;
RotateCommand command = new RotateCommand();
command.Angle = 90 * 100;
command.FillColor = new RasterColor(255, 255, 255);
command.Flags = RotateCommandFlags.Resize;
command.Run(_image);
}
_codecs.SaveCmykPlanes(_image, destFile, RasterImageFormat.JpegCmyk422, 0, 1, CodecsSavePageMode.Overwrite);
Matt Bresson
Developer Support Engineer
LEAD Technologies, Inc.
LEADTOOLS Support
General
LEADTOOLS SDK Examples
HOW TO: C# Run Image Processing Commands on CMYK Image
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.