VintaSoft Imaging .NET SDK 12.4: Documentation for .NET developer
Vintasoft.Imaging.ColorManagement Namespace / ColorManagementDecodeSettings Class
Members Object Syntax Example Hierarchy Requirements SeeAlso
In This Topic
    ColorManagementDecodeSettings Class
    In This Topic
    Contains the color management settings, which are used for image decoding.
    Object Model
    ColorTransformSet IccProfile IccProfile IccProfile IccProfile IccProfile IccProfile ColorManagementDecodeSettings
    Syntax
    'Declaration
    
    <TypeConverterAttribute(Vintasoft.Imaging.TypeConverters.SimpleTypeConverter)>
    Public Class ColorManagementDecodeSettings
    
    
    [TypeConverter(Vintasoft.Imaging.TypeConverters.SimpleTypeConverter)]
    public class ColorManagementDecodeSettings
    
    
    [TypeConverter(Vintasoft.Imaging.TypeConverters.SimpleTypeConverter)]
    public __gc class ColorManagementDecodeSettings
    
    
    [TypeConverter(Vintasoft.Imaging.TypeConverters.SimpleTypeConverter)]
    public ref class ColorManagementDecodeSettings
    
    
    Example

    Here is an example that shows how to decode image with enabled color management:

    
    ''' <summary>
    ''' Returns a copy of specified RGB VintasoftImage with enabled color management
    ''' using specified input and output profiles.
    ''' </summary>
    Public Shared Function GetImageCopy(image As Vintasoft.Imaging.VintasoftImage, inputCmykProfile As Vintasoft.Imaging.ColorManagement.Icc.IccProfile, inputRgbProfile As Vintasoft.Imaging.ColorManagement.Icc.IccProfile, outputRgbProfile As Vintasoft.Imaging.ColorManagement.Icc.IccProfile) As Vintasoft.Imaging.VintasoftImage
        ' create new color management decoding settings
        Dim colorManagement As New Vintasoft.Imaging.ColorManagement.ColorManagementDecodeSettings()
        ' set input CMYK profile
        colorManagement.InputCmykProfile = inputCmykProfile
        ' set input RGB profile
        colorManagement.InputRgbProfile = inputRgbProfile
        ' set output RGB profile
        colorManagement.OutputRgbProfile = outputRgbProfile
    
        ' create decoding settings
        If image.DecodingSettings Is Nothing Then
            image.DecodingSettings = New Vintasoft.Imaging.Codecs.Decoders.DecodingSettings()
        End If
        ' set color management settings
        image.DecodingSettings.ColorManagement = colorManagement
        ' copy image with specified color management
        Return DirectCast(image.Clone(), Vintasoft.Imaging.VintasoftImage)
    End Function
    
    
    
    /// <summary>
    /// Returns a copy of specified RGB VintasoftImage with enabled color management
    /// using specified input and output profiles.
    /// </summary>
    public static Vintasoft.Imaging.VintasoftImage GetImageCopy(
        Vintasoft.Imaging.VintasoftImage image, 
        Vintasoft.Imaging.ColorManagement.Icc.IccProfile inputCmykProfile, 
        Vintasoft.Imaging.ColorManagement.Icc.IccProfile inputRgbProfile,
        Vintasoft.Imaging.ColorManagement.Icc.IccProfile outputRgbProfile)
    {
        // create new color management decoding settings
        Vintasoft.Imaging.ColorManagement.ColorManagementDecodeSettings colorManagement = 
            new Vintasoft.Imaging.ColorManagement.ColorManagementDecodeSettings();
        // set input CMYK profile
        colorManagement.InputCmykProfile = inputCmykProfile;
        // set input RGB profile
        colorManagement.InputRgbProfile = inputRgbProfile;
        // set output RGB profile
        colorManagement.OutputRgbProfile = outputRgbProfile;
    
        // create decoding settings
        if (image.DecodingSettings == null)
            image.DecodingSettings = new Vintasoft.Imaging.Codecs.Decoders.DecodingSettings();
        // set color management settings
        image.DecodingSettings.ColorManagement = colorManagement;
        // copy image with specified color management
        return (Vintasoft.Imaging.VintasoftImage)image.Clone();
    }
    
    

    Inheritance Hierarchy

    System.Object
       Vintasoft.Imaging.ColorManagement.ColorManagementDecodeSettings

    Requirements

    Target Platforms: .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    See Also