Leadtools.Codecs Namespace > RasterCodecs Class > Convert Method : Convert(Stream,Stream,RasterImageFormat,Int32,Int32,Int32,CodecsImageInfo) Method |
public void Convert( Stream srcStream, Stream destStream, RasterImageFormat format, int width, int height, int bitsPerPixel, CodecsImageInfo info )
'Declaration Public Overloads Sub Convert( _ ByVal srcStream As Stream, _ ByVal destStream As Stream, _ ByVal format As RasterImageFormat, _ ByVal width As Integer, _ ByVal height As Integer, _ ByVal bitsPerPixel As Integer, _ ByVal info As CodecsImageInfo _ )
'Usage Dim instance As RasterCodecs Dim srcStream As Stream Dim destStream As Stream Dim format As RasterImageFormat Dim width As Integer Dim height As Integer Dim bitsPerPixel As Integer Dim info As CodecsImageInfo instance.Convert(srcStream, destStream, format, width, height, bitsPerPixel, info)
public void Convert( Stream srcStream, Stream destStream, RasterImageFormat format, int width, int height, int bitsPerPixel, CodecsImageInfo info )
-(BOOL)convert:(LTLeadStream*)srcStream destStream:(LTLeadStream*)destStream format:(LTRasterImageFormat)format width:(unsigned int)width height:(unsigned int)height bitsPerPixel:(unsigned int)bitsPerPixel info:(LTCodecsImageInfo*)info error:(NSError**)outError;
public void convert(ILeadStream srcStream, ILeadStream destStream, RasterImageFormat format, int width, int height, int bitsPerPixel, CodecsImageInfo info)
function Leadtools.Codecs.RasterCodecs.Convert(Stream,Stream,RasterImageFormat,Int32,Int32,Int32,CodecsImageInfo)( srcStream , destStream , format , width , height , bitsPerPixel , info )
public: void Convert( Stream^ srcStream, Stream^ destStream, RasterImageFormat format, int width, int height, int bitsPerPixel, 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.