Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Static Public Member Functions | Static Private Member Functions
icl::io::JPEGDecoder Class Reference

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

#include <JPEGDecoder.h>

List of all members.

Static Public Member Functions

static void decode (utils::File &file, core::ImgBase **dst) throw (utils::InvalidFileFormatException)
 Decode JPEG-File (E.g. used for FileGrabberPluginJPEG)
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)

Static Private Member Functions

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

Detailed Description

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


Member Function Documentation

static void icl::io::JPEGDecoder::decode ( utils::File file,
core::ImgBase **  dst 
) throw (utils::InvalidFileFormatException) [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
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
static void icl::io::JPEGDecoder::decode_internal ( utils::File file,
const unsigned char *  data,
unsigned int  maxDataLen,
core::ImgBase **  dst 
) throw (utils::InvalidFileFormatException) [static, private]

internal utility function, which does all the work


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines