Represents a collection of most commonly used standard color transforms.
Here is an example that shows how to convert a color in RGB format to a color in XYZ format using standard color transform from sRGB to PCSXYZ:
''' <summary>
''' Returns a XYZ color converted from specified RGB color
''' using standard color transform.
''' </summary>
Public Shared Function TransformRgbToXyz(rgbColor As Vintasoft.Imaging.ImageColors.Rgb24Color) As Vintasoft.Imaging.ImageColors.XyzColor
' fill buffer of RGB color
Dim sourceColor As Byte() = New Byte(2) {}
sourceColor(0) = rgbColor.Red
sourceColor(1) = rgbColor.Green
sourceColor(2) = rgbColor.Blue
' create buffer for XYZ color
Dim destColor As Double() = New Double(2) {}
' perform color transform from byte values to double values
Vintasoft.Imaging.ColorManagement.ColorTransforms.SRgbToPcsXyzD50.TransformFrom8bitVector(sourceColor, 0, 1, destColor, 0)
' return XYZ color
Return New Vintasoft.Imaging.ImageColors.XyzColor(destColor(0), destColor(1), destColor(2))
End Function
/// <summary>
/// Returns a XYZ color converted from specified RGB color
/// using standard color transform.
/// </summary>
public static Vintasoft.Imaging.ImageColors.XyzColor TransformRgbToXyz(
Vintasoft.Imaging.ImageColors.Rgb24Color rgbColor)
{
// fill buffer of RGB color
byte[] sourceColor = new byte[3];
sourceColor[0] = rgbColor.Red;
sourceColor[1] = rgbColor.Green;
sourceColor[2] = rgbColor.Blue;
// create buffer for XYZ color
double[] destColor = new double[3];
// perform color transform from byte values to double values
Vintasoft.Imaging.ColorManagement.ColorTransforms.SRgbToPcsXyzD50.TransformFrom8bitVector(
sourceColor, 0, 1, destColor, 0);
// return XYZ color
return new Vintasoft.Imaging.ImageColors.XyzColor(destColor[0], destColor[1], destColor[2]);
}
System.Object
 Vintasoft.Imaging.ColorManagement.ColorTransforms
Target Platforms: .NET9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5