VintaSoft Imaging .NET SDK 14.0: Документация для .NET разработчика
Vintasoft.Imaging.ColorManagement Namespace / SimpleCompositeColorTransform Class
Члены типа Объект Синтаксис Example Иерархия Требования Смотрите также
В этом разделе
    Класс SimpleCompositeColorTransform
    В этом разделе
    Простое преобразование цвета, содержащее группу преобразований цвета.
    Объектная модель
    ColorTransform ColorSpaceFormat ColorSpaceFormat SimpleCompositeColorTransform
    Синтаксис
    'Declaration
    
    Public NotInheritable Class SimpleCompositeColorTransform
       Inherits CompositeColorTransform
    
    
    public sealed class SimpleCompositeColorTransform : CompositeColorTransform
    
    
    public __gc __sealed class SimpleCompositeColorTransform : public CompositeColorTransform*
    
    
    public ref class SimpleCompositeColorTransform sealed : public CompositeColorTransform^
    
    
    Пример

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

    
    ''' <summary>
    ''' Creates composite color transform that converts color from BGR format to RGB format
    ''' and then converts to XYZ format using standard color transform.
    ''' </summary>
    Public Shared Function CreateCompositeColorTransform() As Vintasoft.Imaging.ColorManagement.ColorTransform
        ' channels order for BGR format
        Dim bgrOrder As New Vintasoft.Imaging.ColorChannelsOrder(New Integer() {2, 1, 0})
        ' channels order for RGB format
        Dim rgbOrder As New Vintasoft.Imaging.ColorChannelsOrder(New Integer() {0, 1, 2})
        ' create the channels order conversion transform
        Dim bgrToRgbTransform As Vintasoft.Imaging.ColorManagement.ColorTransform = New Vintasoft.Imaging.ColorManagement.ChannelsOrderConverterTransform(Vintasoft.Imaging.ColorSpaceType.sRGB, bgrOrder, rgbOrder)
        ' create the composite transform using channels order conversion transform and standard transform
        Return Vintasoft.Imaging.ColorManagement.SimpleCompositeColorTransform.Create(bgrToRgbTransform, Vintasoft.Imaging.ColorManagement.ColorTransforms.SRgbToPcsXyzD50)
    End Function
    
    
    
    /// <summary>
    /// Creates composite color transform that converts color from BGR format to RGB format
    /// and then converts to XYZ format using standard color transform.
    /// </summary>
    public static Vintasoft.Imaging.ColorManagement.ColorTransform CreateCompositeColorTransform()
    {
        // channels order for BGR format
        Vintasoft.Imaging.ColorChannelsOrder bgrOrder = 
            new Vintasoft.Imaging.ColorChannelsOrder(new int[] { 2, 1, 0 });
        // channels order for RGB format
        Vintasoft.Imaging.ColorChannelsOrder rgbOrder = 
            new Vintasoft.Imaging.ColorChannelsOrder(new int[] { 0, 1, 2 });
        // create the channels order conversion transform
        Vintasoft.Imaging.ColorManagement.ColorTransform bgrToRgbTransform = 
            new Vintasoft.Imaging.ColorManagement.ChannelsOrderConverterTransform(
                Vintasoft.Imaging.ColorSpaceType.sRGB, bgrOrder, rgbOrder);
        // create the composite transform using channels order conversion transform and standard transform
        return Vintasoft.Imaging.ColorManagement.SimpleCompositeColorTransform.Create(
            bgrToRgbTransform, Vintasoft.Imaging.ColorManagement.ColorTransforms.SRgbToPcsXyzD50);
    }
    
    

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

    System.Object
       Vintasoft.Imaging.ColorManagement.ColorTransform
          Vintasoft.Imaging.ColorManagement.CompositeColorTransform
             Vintasoft.Imaging.ColorManagement.SimpleCompositeColorTransform

    Требования

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

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