Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.8.30
|
Leadtools.Codecs Namespace > RasterCodecs Class > ConvertAsync Method : ConvertAsync(ILeadStream,ILeadStream,RasterImageFormat,Int32,Int32,Int32,Int32,CodecsImageInfo) Method |
public IAsyncAction ConvertAsync( ILeadStream srcStream, ILeadStream destStream, RasterImageFormat format, int width, int height, int bitsPerPixel, int pageNumber, CodecsImageInfo info )
'Declaration
Public Overloads Function ConvertAsync( _ ByVal srcStream As ILeadStream, _ ByVal destStream As ILeadStream, _ ByVal format As RasterImageFormat, _ ByVal width As Integer, _ ByVal height As Integer, _ ByVal bitsPerPixel As Integer, _ ByVal pageNumber As Integer, _ ByVal info As CodecsImageInfo _ ) As IAsyncAction
'Usage
Dim instance As RasterCodecs Dim srcStream As ILeadStream Dim destStream As ILeadStream Dim format As RasterImageFormat Dim width As Integer Dim height As Integer Dim bitsPerPixel As Integer Dim pageNumber As Integer Dim info As CodecsImageInfo Dim value As IAsyncAction value = instance.ConvertAsync(srcStream, destStream, format, width, height, bitsPerPixel, pageNumber, info)
public IAsyncAction ConvertAsync( ILeadStream srcStream, ILeadStream destStream, RasterImageFormat format, int width, int height, int bitsPerPixel, int pageNumber, CodecsImageInfo info )
function Leadtools.Codecs.RasterCodecs.ConvertAsync(ILeadStream,ILeadStream,RasterImageFormat,Int32,Int32,Int32,Int32,CodecsImageInfo)( srcStream , destStream , format , width , height , bitsPerPixel , pageNumber , info )
public: IAsyncAction^ ConvertAsync( ILeadStream^ srcStream, ILeadStream^ destStream, RasterImageFormat format, int width, int height, int bitsPerPixel, int pageNumber, CodecsImageInfo^ info )
If you convert to a lower bits-per-pixel format, this method optimizes the colors automatically. For example, when converting a 24-bit file (16 million colors) to an 8-bit file (256 colors) this method selects the best 256 colors to represent the 24-bit image
Note that this is a high-level method that does conversion from all possible formats to all possible formats.