public string OutputProfile { get; set; }
OutputProfile # get and set (ConversionParameters)
String that contains the output file name used with the ConversionMethodFlags.ConversionMethodFlags.UseCustomIcc active conversion method (ActiveMethod property).
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ColorConversion;
using Leadtools.ImageProcessing;
// Rgb and Cmyk color buffer arrays
public byte[] cmykColor = { 100, 100, 100, 100 }; // Input CMYK byte array
public byte[] rgbColorLoaded = new byte[3]; // Output RGB byte array using a loaded ICC profile
public byte[] rgbColorBuiltIn = new byte[3]; // Output RGB byte array using the built in ICC profile
public void InputProfileExample()
{
// StartUp the color conversion engine
RasterColorConverterEngine.Startup();
// Use custom ICC method in conversion parameters
ConversionParameters convParams = new ConversionParameters();
convParams.Method = ConversionMethodFlags.UseCustomIcc | ConversionMethodFlags.UseBuiltIn;
convParams.ActiveMethod = ConversionMethodFlags.UseCustomIcc;
// Set the input and output profiles
convParams.InputProfile = Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "CmykProfile.icc");
convParams.OutputProfile = Path.Combine(LEAD_VARS.ImagesDir, "ColorConversion", "RgbProfile.icc");
// Set the DestinationInputTable property
convParams.DestinationInputTable = string.Empty;
// Whitepoint and CMYK Properties
convParams.WhitePoint = new ConversionWhitePoint() { WhitePoint = ConversionWhitePointType.D50 };
convParams.CmykParameters = new ConversionCmykParameters() { GcrLevel = 175, Mask = ConversionCmykMask.Gcr };
// Convert CMYK to RGB
using (RasterColorConverterEngine colorConverterEngine = new RasterColorConverterEngine())
{
colorConverterEngine.Start(ConversionColorFormat.Cmyk, ConversionColorFormat.Rgb, convParams);
colorConverterEngine.Convert(cmykColor, 0, rgbColorLoaded, 0, 1, 1, 0, 0);
Debug.WriteLine("RGB Values after conversion using loaded profiles:\t" + rgbColorLoaded[0] + " " + rgbColorLoaded[1] + " " + rgbColorLoaded[2]);
// Change the active method for conversion
convParams.Method = ConversionMethodFlags.ChangeActiveMethod;
convParams.ActiveMethod = ConversionMethodFlags.UseBuiltIn; // Switch to built-in method
// Convert CMYK to RGB with new parameters
colorConverterEngine.SetParameters(convParams);
colorConverterEngine.Convert(cmykColor, 0, rgbColorBuiltIn, 0, 1, 1, 0, 0);
Debug.WriteLine("RGB Values after conversion using built-in profiles:\t" + rgbColorBuiltIn[0] + " " + rgbColorBuiltIn[1] + " " + rgbColorBuiltIn[2]);
colorConverterEngine.Stop();
}
// Shutdown the color conversion engine
RasterColorConverterEngine.Shutdown();
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images";
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document