Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.6.28
|
Leadtools Namespace > RasterBufferConverter Class > Convert Method : Convert(IBuffer,Int32,Int32,Int32,Int32,RasterByteOrder,RasterByteOrder,RasterColor[],RasterColor[],Int32) Method |
public static void Convert( IBuffer buffer, int bufferOffset, int width, int inBitsPerPixel, int outBitsPerPixel, RasterByteOrder inOrder, RasterByteOrder outOrder, RasterColor[] inPalette, RasterColor[] outPalette, int alpha )
'Declaration
Public Overloads Shared Sub Convert( _ ByVal buffer As IBuffer, _ ByVal bufferOffset As Integer, _ ByVal width As Integer, _ ByVal inBitsPerPixel As Integer, _ ByVal outBitsPerPixel As Integer, _ ByVal inOrder As RasterByteOrder, _ ByVal outOrder As RasterByteOrder, _ ByVal inPalette() As RasterColor, _ ByVal outPalette() As RasterColor, _ ByVal alpha As Integer _ )
'Usage
Dim buffer As IBuffer Dim bufferOffset As Integer Dim width As Integer Dim inBitsPerPixel As Integer Dim outBitsPerPixel As Integer Dim inOrder As RasterByteOrder Dim outOrder As RasterByteOrder Dim inPalette() As RasterColor Dim outPalette() As RasterColor Dim alpha As Integer RasterBufferConverter.Convert(buffer, bufferOffset, width, inBitsPerPixel, outBitsPerPixel, inOrder, outOrder, inPalette, outPalette, alpha)
public static void Convert( IBuffer buffer, int bufferOffset, int width, int inBitsPerPixel, int outBitsPerPixel, RasterByteOrder inOrder, RasterByteOrder outOrder, RasterColor[] inPalette, RasterColor[] outPalette, int alpha )
function Leadtools.RasterBufferConverter.Convert(IBuffer,Int32,Int32,Int32,Int32,RasterByteOrder,RasterByteOrder,RasterColor[],RasterColor[],Int32)( buffer , bufferOffset , width , inBitsPerPixel , outBitsPerPixel , inOrder , outOrder , inPalette , outPalette , alpha )
public: static void Convert( IBuffer^ buffer, int bufferOffset, int width, int inBitsPerPixel, int outBitsPerPixel, RasterByteOrder inOrder, RasterByteOrder outOrder, array<RasterColor>^ inPalette, array<RasterColor>^ outPalette, int alpha )
The conversion uses only one buffer, which must be large enough to hold the data before and after conversion.
Image data that is 8 bits per pixel or less must use a palette, and this method can use such data as input, output, or both. Therefore, you may need to specify the palette for the input, or for the output, or both.
If either inBitsPerPixel or outBitsPerPixel is 16, flags is used to determine whether the data should be treated as color or grayscale.
For more information, refer to Introduction to Image Processing With LEADTOOLS.