←Select platform

ConvertDirectToImage(ConversionColorFormat,ConversionColorFormat,IntPtr,long,RasterImage,int,int,int,int) Method

Summary
Converts image data in a buffer from one color conversion model to RGB\BGR directly using built in algorithms, and sets the output as RasterImage.
Syntax
C#
C++/CLI
Python
public static void ConvertDirectToImage( 
   ConversionColorFormat srcFormat, 
   ConversionColorFormat destFormat, 
   IntPtr srcBuffer, 
   long srcBufferOffset, 
   RasterImage image, 
   int width, 
   int height, 
   int inAlign, 
   int outAlign 
) 
public: 
static void ConvertDirectToImage(  
   ConversionColorFormat srcFormat, 
   ConversionColorFormat destFormat, 
   IntPtr srcBuffer, 
   int64 srcBufferOffset, 
   RasterImage^ image, 
   int width, 
   int height, 
   int inAlign, 
   int outAlign 
)  

Parameters

srcFormat
Format of the input data.

destFormat
Format of the output data.

srcBuffer
A pointer to the buffer containing the input data.

srcBufferOffset
Offset to the first byte of the  srcBuffer data buffer.

image
An RasterImage object that will hold the converted data.

width
Width of pixels to be processed.

height
Height of pixels to be processed.

inAlign
Each scanline in the input buffer is a multiple of inAlign bytes.

outAlign
Each scan line in the output buffer is a multiple of outAlign bytes.

Remarks

There is no need to call the Start and Stop methods to initialize or stop the conversion engine. This method works only for conversion to BGR or RGB color space formats. For more information about Alignment Parameters, refer to Alignment Parameters. To convert to the Y41P type the input buffer length must be multiple of 8

Requirements

Target Platforms

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.ColorConversion Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.