VintaSoft Imaging .NET SDK 15.1: Документация для .NET разработчика
Vintasoft.Imaging.ColorManagement Namespace / ColorManagementDecodeSettings Class
Члены типа Объект Синтаксис Example Иерархия Требования Смотрите также
В этом разделе
Класс ColorManagementDecodeSettings
В этом разделе
Содержит параметры управления цветом, которые используются для декодирования изображения.
Объектная модель
ColorTransformSet IccProfile IccProfile IccProfile IccProfile IccProfile IccProfile ColorManagementDecodeSettings
Синтаксис
'Declaration

<TypeConverterAttribute(Vintasoft.Imaging.TypeConverters.SimpleTypeConverter)>
Public Class ColorManagementDecodeSettings

[TypeConverter(Vintasoft.Imaging.TypeConverters.SimpleTypeConverter)]
public class ColorManagementDecodeSettings

Пример

Вот пример, показывающий, как декодировать изображение с включенным управлением цветом:


''' <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();
}

Иерархия наследования

System.Object
   Vintasoft.Imaging.ColorManagement.ColorManagementDecodeSettings

Требования

Целевые платформы: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

Смотрите также