VintaSoft Imaging .NET SDK 12.4: Documentation for .NET developer
Vintasoft.Imaging.ColorManagement Namespace / SimpleCompositeColorTransform Class
Members Object Syntax Example Hierarchy Requirements SeeAlso
In This Topic
    SimpleCompositeColorTransform Class
    In This Topic
    Simple color transform which contains a group of color transforms.
    Object Model
    ColorTransform ColorSpaceFormat ColorSpaceFormat SimpleCompositeColorTransform
    Syntax
    '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^
    
    
    Example

    Here is an example that shows how to create a composite transform from specified color transforms:

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

    Inheritance Hierarchy

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

    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