Gets or sets a character string that contains the input profile name, used with the
ConversionMethodFlags.
ConversionMethodFlags.UseCustomIcc active conversion method.
Syntax
Visual Basic (Declaration) | |
---|
Public Property InputProfile As String |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As ConversionParameters
Dim value As String
instance.InputProfile = value
value = instance.InputProfile
|
C# | |
---|
public string InputProfile {get; set;} |
C++/CLI | |
---|
public:
property String^ InputProfile {
String^ get();
void set (String^ value);
} |
Return Value
Character string that contains the input file name used with the ConversionMethodFlags.
ConversionMethodFlags.UseCustomIcc active conversion method (
ActiveMethod property).
Example
This example will convert CMYK color to RGB using custom ICM Profile.
Visual Basic | Copy Code |
---|
Public Sub InputProfilePropertyExample()
RasterColorConverter.Startup()
Dim rgbColor As Byte() = New Byte(2) {}
Dim cmykColor As Byte() = {100, 100, 100, 100}
Dim convParams As ConversionParameters = New ConversionParameters()
convParams.Method = ConversionMethodFlags.UseIcc Or ConversionMethodFlags.UseBuiltIn
convParams.ActiveMethod = ConversionMethodFlags.UseBuiltIn
Dim whitePoint As ConversionWhitePoint = New ConversionWhitePoint()
whitePoint.WhitePoint = ConversionWhitePointType.D50
convParams.WhitePoint = whitePoint
convParams.InputProfile = LeadtoolsExamples.Common.ImagesPath.Path + "MyCmykProfile.icm"
convParams.OutputProfile = LeadtoolsExamples.Common.ImagesPath.Path + "MyRgbProfile.icm"
convParams.DestinationInputTable = String.Empty
Dim cmykParameters As ConversionCmykParameters = New ConversionCmykParameters()
cmykParameters.GcrLevel = 175
cmykParameters.Mask = ConversionCmykMask.Gcr
convParams.CmykParameters = cmykParameters
Dim MYColorConverter As RasterColorConverter = New RasterColorConverter()
Try
MYColorConverter.Start(ConversionColorFormat.Cmyk, ConversionColorFormat.Rgb, convParams)
MYColorConverter.Convert(cmykColor, 0, rgbColor, 0, 1, 1, 0, 0)
convParams.Method = ConversionMethodFlags.ChangeActiveMethod
convParams.ActiveMethod = ConversionMethodFlags.UseIcc
MYColorConverter.SetParameters(convParams)
MYColorConverter.Convert(cmykColor, 0, rgbColor, 0, 1, 1, 0, 0)
MYColorConverter.Stop()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
RasterColorConverter.Shutdown()
End Sub |
C# | Copy Code |
---|
public void InputProfilePropertyExample() { // StartUp the ColorConversion. RasterColorConverter.Startup(); // Rgb and Cmyk color buffer arrays byte[] rgbColor = new byte[3]; byte[] cmykColor = { 100, 100, 100, 100 }; // Initialize a new ConversionParameters class object. ConversionParameters convParams = new ConversionParameters(); // Set the Method property convParams.Method = ConversionMethodFlags.UseIcc | ConversionMethodFlags.UseBuiltIn; // Set the ActiveMethod property. convParams.ActiveMethod = ConversionMethodFlags.UseBuiltIn; // Initialize the White property class ConversionWhitePoint whitePoint = new ConversionWhitePoint(); // Set the WhitePoint property whitePoint.WhitePoint = ConversionWhitePointType.D50; convParams.WhitePoint = whitePoint; // Set the InputProfile property convParams.InputProfile = LeadtoolsExamples.Common.ImagesPath.Path + "MyCmykProfile.icm"; // Set the OutputProfile property convParams.OutputProfile = LeadtoolsExamples.Common.ImagesPath.Path + "MyRgbProfile.icm"; // Set the DestinationInputTable property convParams.DestinationInputTable = string.Empty; ConversionCmykParameters cmykParameters = new ConversionCmykParameters(); cmykParameters.GcrLevel = 175; cmykParameters.Mask = ConversionCmykMask.Gcr; convParams.CmykParameters = cmykParameters; // Initialize a new Converter object RasterColorConverter MYColorConverter = new RasterColorConverter(); try { // Start conversion MYColorConverter.Start(ConversionColorFormat.Cmyk, ConversionColorFormat.Rgb, convParams); // Convert the cmyk color to rgb MYColorConverter.Convert(cmykColor, 0, rgbColor, 0, 1, 1, 0, 0); //change the active method for conversion convParams.Method = ConversionMethodFlags.ChangeActiveMethod; //switch to ICC conversion method convParams.ActiveMethod = ConversionMethodFlags.UseIcc; //update the conversion state MYColorConverter.SetParameters(convParams); // convert the image buffer MYColorConverter.Convert(cmykColor, 0, rgbColor, 0, 1, 1, 0, 0); // Stop conversion MYColorConverter.Stop(); } catch (Exception ex) { MessageBox.Show(ex.Message); } RasterColorConverter.Shutdown(); } |
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
See Also