Image Component Library (ICL)
Static Public Member Functions | Static Private Member Functions | List of all members
icl::io::JPEGDecoder Class Reference

Utility class for decoding JPEG-Data streams (with ICL_HAVE_LIBJPEG only) More...

#include <JPEGDecoder.h>

Static Public Member Functions

static void decode (utils::File &file, core::ImgBase **dst)
 Decode JPEG-File (E.g. used for FileGrabberPluginJPEG) More...
 
static void decode (const unsigned char *data, unsigned int maxDataLen, core::ImgBase **dst)
 Decode a data stream (E.g. used for Decoding Motion-JPEG streams in unicap's DefaultConvertEngine) More...
 

Static Private Member Functions

static void decode_internal (utils::File *file, const unsigned char *data, unsigned int maxDataLen, core::ImgBase **dst)
 internal utility function, which does all the work More...
 

Detailed Description

Utility class for decoding JPEG-Data streams (with ICL_HAVE_LIBJPEG only)

Member Function Documentation

◆ decode() [1/2]

static void icl::io::JPEGDecoder::decode ( utils::File file,
core::ImgBase **  dst 
)
static

Decode JPEG-File (E.g. used for FileGrabberPluginJPEG)

Parameters
filemust be opened in mode readBinary or not opend
dstimage, which is adapted to the found image parameters

◆ decode() [2/2]

static void icl::io::JPEGDecoder::decode ( const unsigned char *  data,
unsigned int  maxDataLen,
core::ImgBase **  dst 
)
static

Decode a data stream (E.g. used for Decoding Motion-JPEG streams in unicap's DefaultConvertEngine)

Parameters
datajpeg data stream (must be valid, otherwise unpredictable behaviour occurs
maxDataLenlength of the given data pointer Note:This is just an upper limit to avoid segmentation faults on corrupted jpeg data (e.g. end-of-image-marker is missing). The given data pointer can be much longer then the actual jpeg data. If that is the case, libjpeg obviously reads only necessary bytes.
dstdestination image, which is adapted to the found images parameters

◆ decode_internal()

static void icl::io::JPEGDecoder::decode_internal ( utils::File file,
const unsigned char *  data,
unsigned int  maxDataLen,
core::ImgBase **  dst 
)
staticprivate

internal utility function, which does all the work


The documentation for this class was generated from the following file: