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



In This Topic
    SimpleCompositeColorTransform Class
    In This Topic
    Simple color transform which contains a group of color transforms.
    Object Model
    SimpleCompositeColorTransform Class
    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
    This example 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.ColorManagement.ColorChannelsOrder(New Integer() {2, 1, 0})
        ' channels order for RGB format
        Dim rgbOrder As New Vintasoft.Imaging.ColorManagement.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.ColorManagement.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.ColorManagement.ColorChannelsOrder bgrOrder = 
            new Vintasoft.Imaging.ColorManagement.ColorChannelsOrder(new int[] { 2, 1, 0 });
        // channels order for RGB format
        Vintasoft.Imaging.ColorManagement.ColorChannelsOrder rgbOrder = 
            new Vintasoft.Imaging.ColorManagement.ColorChannelsOrder(new int[] { 0, 1, 2 });
        // create the channels order conversion transform
        Vintasoft.Imaging.ColorManagement.ColorTransform bgrToRgbTransform = 
            new Vintasoft.Imaging.ColorManagement.ChannelsOrderConverterTransform(
                Vintasoft.Imaging.ColorManagement.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: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also