Gets or sets a character string that contains the input profile name, used with the ConversionMethodFlags.UseCustomIcc active conversion method.
public string InputProfile {get; set;}Public Property InputProfile As StringCharacter string that contains the input file name used with the ConversionMethodFlags.ConversionMethodFlags.UseCustomIcc active conversion method (ActiveMethod property).
This example will convert CMYK color to RGB using custom ICM Profile.
Imports LeadtoolsImports Leadtools.CodecsImports Leadtools.ColorConversion<TestMethod()> _Public Sub InputProfilePropertyExample()' StartUp the ColorConversion.RasterColorConverterEngine.Startup()' Rgb and Cmyk color buffer arraysDim rgbColor As Byte() = New Byte(2) {}Dim cmykColor As Byte() = {100, 100, 100, 100}' Initialize a new ConversionParameters class object.Dim convParams As ConversionParameters = New ConversionParameters()' Set the Method propertyconvParams.Method = ConversionMethodFlags.UseIcc Or ConversionMethodFlags.UseBuiltIn' Set the ActiveMethod property.convParams.ActiveMethod = ConversionMethodFlags.UseBuiltIn' Initialize the White property classDim whitePoint As ConversionWhitePoint = New ConversionWhitePoint()' Set the WhitePoint propertywhitePoint.WhitePoint = ConversionWhitePointType.D50convParams.WhitePoint = whitePoint' Set the InputProfile propertyconvParams.InputProfile = Path.Combine(LEAD_VARS.ImagesDir, "MyCmykProfile.icm")' Set the OutputProfile propertyconvParams.OutputProfile = Path.Combine(LEAD_VARS.ImagesDir, "MyRgbProfile.icm")' Set the DestinationInputTable propertyconvParams.DestinationInputTable = String.EmptyDim cmykParameters As ConversionCmykParameters = New ConversionCmykParameters()cmykParameters.GcrLevel = 175cmykParameters.Mask = ConversionCmykMask.GcrconvParams.CmykParameters = cmykParameters' Initialize a new Converter objectDim MYColorConverter As RasterColorConverterEngine = New RasterColorConverterEngine()Try' Start conversionMYColorConverter.Start(ConversionColorFormat.Cmyk, ConversionColorFormat.Rgb, convParams)' Convert the cmyk color to rgbMYColorConverter.Convert(cmykColor, 0, rgbColor, 0, 1, 1, 0, 0)'change the active method for conversionconvParams.Method = ConversionMethodFlags.ChangeActiveMethod'switch to ICC conversion methodconvParams.ActiveMethod = ConversionMethodFlags.UseIcc'update the conversion stateMYColorConverter.SetParameters(convParams)' convert the image bufferMYColorConverter.Convert(cmykColor, 0, rgbColor, 0, 1, 1, 0, 0)' Stop conversionMYColorConverter.Stop()Catch ex As ExceptionMessageBox.Show(ex.Message)End TryRasterColorConverterEngine.Shutdown()End SubPublic NotInheritable Class LEAD_VARSPublic Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"End Class
using Leadtools;using Leadtools.Codecs;using Leadtools.ColorConversion;public void InputProfilePropertyExample(){// StartUp the ColorConversion.RasterColorConverterEngine.Startup();// Rgb and Cmyk color buffer arraysbyte[] rgbColor = new byte[3];byte[] cmykColor = { 100, 100, 100, 100 };// Initialize a new ConversionParameters class object.ConversionParameters convParams = new ConversionParameters();// Set the Method propertyconvParams.Method = ConversionMethodFlags.UseIcc | ConversionMethodFlags.UseBuiltIn;// Set the ActiveMethod property.convParams.ActiveMethod = ConversionMethodFlags.UseBuiltIn;// Initialize the White property classConversionWhitePoint whitePoint = new ConversionWhitePoint();// Set the WhitePoint propertywhitePoint.WhitePoint = ConversionWhitePointType.D50;convParams.WhitePoint = whitePoint;// Set the InputProfile propertyconvParams.InputProfile = Path.Combine(LEAD_VARS.ImagesDir, "MyCmykProfile.icm");// Set the OutputProfile propertyconvParams.OutputProfile = Path.Combine(LEAD_VARS.ImagesDir, "MyRgbProfile.icm");// Set the DestinationInputTable propertyconvParams.DestinationInputTable = string.Empty;ConversionCmykParameters cmykParameters = new ConversionCmykParameters();cmykParameters.GcrLevel = 175;cmykParameters.Mask = ConversionCmykMask.Gcr;convParams.CmykParameters = cmykParameters;// Initialize a new Converter objectRasterColorConverterEngine MYColorConverter = new RasterColorConverterEngine();try{// Start conversionMYColorConverter.Start(ConversionColorFormat.Cmyk, ConversionColorFormat.Rgb, convParams);// Convert the cmyk color to rgbMYColorConverter.Convert(cmykColor, 0, rgbColor, 0, 1, 1, 0, 0);//change the active method for conversionconvParams.Method = ConversionMethodFlags.ChangeActiveMethod;//switch to ICC conversion methodconvParams.ActiveMethod = ConversionMethodFlags.UseIcc;//update the conversion stateMYColorConverter.SetParameters(convParams);// convert the image bufferMYColorConverter.Convert(cmykColor, 0, rgbColor, 0, 1, 1, 0, 0);// Stop conversionMYColorConverter.Stop();}catch (Exception ex){MessageBox.Show(ex.Message);}RasterColorConverterEngine.Shutdown();}static class LEAD_VARS{public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";}
|
Products |
Support |
Feedback: InputProfile Property - Leadtools.ColorConversion |
Introduction |
Help Version 19.0.2017.3.22
|

Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.