ImageGear .NET v25.1 - Updated
ConvertPixelFormat(ImGearPixel,ImGearColorSpace,Int32[],ImGearRGBQuad[],ImGearColorSpace,Int32[],ImGearRGBQuad[]) Method




ImageGear.Core Assembly > ImageGear.Processing Namespace > ImGearRasterProcessing Class > ConvertPixelFormat Method : ConvertPixelFormat(ImGearPixel,ImGearColorSpace,Int32[],ImGearRGBQuad[],ImGearColorSpace,Int32[],ImGearRGBQuad[]) Method
Pixel to convert to the new format.
Source colorspace of the pixel.
Source channel depths of the pixel. Length of the array should correspond to the srcColorSpace parameter.
Source palette used by the pixel, if its colorspace is Indexed, or null otherwise.
Colorspace to convert the pixel to.
New channel depths for the pixel. Length of the array should correspond to the dstColorSpace parameter.
Destination palette for the pixel, if destination colorspace is Indexed, or null otherwise.
Converts a single pixel to new color space and channel depths.
Syntax
'Declaration
 
Public Overloads Shared Sub ConvertPixelFormat( _
   ByVal pixel As ImGearPixel, _
   ByVal sourceColorSpace As ImGearColorSpace, _
   ByVal sourceChannelDepths() As Integer, _
   ByVal sourcePalette() As ImGearRGBQuad, _
   ByVal destinationColorSpace As ImGearColorSpace, _
   ByVal destinationChannelDepths() As Integer, _
   ByVal destinationPalette() As ImGearRGBQuad _
) 
'Usage
 
Dim pixel As ImGearPixel
Dim sourceColorSpace As ImGearColorSpace
Dim sourceChannelDepths() As Integer
Dim sourcePalette() As ImGearRGBQuad
Dim destinationColorSpace As ImGearColorSpace
Dim destinationChannelDepths() As Integer
Dim destinationPalette() As ImGearRGBQuad
 
ImGearRasterProcessing.ConvertPixelFormat(pixel, sourceColorSpace, sourceChannelDepths, sourcePalette, destinationColorSpace, destinationChannelDepths, destinationPalette)

Parameters

pixel
Pixel to convert to the new format.
sourceColorSpace
Source colorspace of the pixel.
sourceChannelDepths
Source channel depths of the pixel. Length of the array should correspond to the srcColorSpace parameter.
sourcePalette
Source palette used by the pixel, if its colorspace is Indexed, or null otherwise.
destinationColorSpace
Colorspace to convert the pixel to.
destinationChannelDepths
New channel depths for the pixel. Length of the array should correspond to the dstColorSpace parameter.
destinationPalette
Destination palette for the pixel, if destination colorspace is Indexed, or null otherwise.
Remarks
Note: Using this method in a cycle for a large array of pixels could be inefficient. Consider creating a temporary ImageGear.Core.ImGearPage class and converting its colorspace and channel depths in this case.
See Also

Reference

ImGearRasterProcessing Class
ImGearRasterProcessing Members
Overload List