VintaSoft Imaging .NET SDK v8.6
Vintasoft.Imaging.ColorManagement Namespace / ColorManagementDecodeSettings Class
Members Example



In This Topic
    ColorManagementDecodeSettings Class
    In This Topic
    Contains the color management settings, which are used for image decoding.
    Object Model
    ColorManagementDecodeSettings ClassColorTransformSet ClassIccProfile ClassIccProfile ClassIccProfile ClassIccProfile ClassIccProfile ClassIccProfile Class
    Syntax
    'Declaration
     
    <TypeConverterAttribute("Vintasoft.Imaging.TypeConverters.SimpleTypeConverter, Vintasoft.Imaging, Version=8.6.5.1, Culture=neutral, PublicKeyToken=153caf29a10d2e31")>
    Public Class ColorManagementDecodeSettings 
    [TypeConverter("Vintasoft.Imaging.TypeConverters.SimpleTypeConverter, Vintasoft.Imaging, Version=8.6.5.1, Culture=neutral, PublicKeyToken=153caf29a10d2e31")]
    public class ColorManagementDecodeSettings 
    [TypeConverter("Vintasoft.Imaging.TypeConverters.SimpleTypeConverter, Vintasoft.Imaging, Version=8.6.5.1, Culture=neutral, PublicKeyToken=153caf29a10d2e31")]
    public __gc class ColorManagementDecodeSettings 
    [TypeConverter("Vintasoft.Imaging.TypeConverters.SimpleTypeConverter, Vintasoft.Imaging, Version=8.6.5.1, Culture=neutral, PublicKeyToken=153caf29a10d2e31")]
    public ref class ColorManagementDecodeSettings 
    Example
    This example 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: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also