Jpeg data compression More...
#include <LDM/compressors/SoJpegDataCompressor.h>
Public Member Functions | |
SoJpegDataCompressor () | |
virtual | ~SoJpegDataCompressor () |
virtual size_t | compress (void *src, size_t srcLen, const TileInfo &tileInfo) |
virtual size_t | uncompress (void *dest, size_t destLen, const TileInfo &tileInfo) |
virtual SbString | getCompressionFormatName () const |
virtual bool | isLossless () |
This class implements a compression scheme based on libjpeg. It is a lossy compression.
The setCompressionLevel method (SoDataCompressor or SoConverterParameters) accepts values between 0 and 100. 0 gives best compression but most loss of data. 100 gives minimum compression and minimum data alteration. Default is 85.
Limitations:
SoGzipDataCompressor, SoDataCompressor, SoJp3dDataCompressor, SoConverterParameters
SoJpegDataCompressor::SoJpegDataCompressor | ( | ) |
Constructor.
virtual SoJpegDataCompressor::~SoJpegDataCompressor | ( | ) | [virtual] |
Destructor.
virtual size_t SoJpegDataCompressor::compress | ( | void * | src, | |
size_t | srcLen, | |||
const TileInfo & | tileInfo | |||
) | [virtual] |
Compresses the given buffer into the internal buffer.
src | a pointer to the data to compress. | |
srcLen | the size of the source buffer in bytes. | |
tileInfo | contains information about the tile being processed. |
Implements SoDataCompressor.
virtual SbString SoJpegDataCompressor::getCompressionFormatName | ( | ) | const [inline, virtual] |
Returns the name of the compression algorithm used by this class.
This is the name the user must pass to the "-c" option of the converter to use this compression ("jpeg" here).
Implements SoDataCompressor.
virtual bool SoJpegDataCompressor::isLossless | ( | ) | [inline, virtual] |
virtual size_t SoJpegDataCompressor::uncompress | ( | void * | dest, | |
size_t | destLen, | |||
const TileInfo & | tileInfo | |||
) | [virtual] |
Uncompresses data from the internal buffer to the given buffer.
dest | a pointer to the destination buffer. | |
destLen | the size of the destination buffer in bytes. | |
tileInfo | contains information about the tile being processed. |
Implements SoDataCompressor.