SoJpegDataCompressor Class Reference
[Compressor]

Large Data Management Jpeg data compression More...

#include <LDM/compressors/SoJpegDataCompressor.h>

Inheritance diagram for SoJpegDataCompressor:
SoDataCompressor SoTypedObject

List of all members.

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 ()

Detailed Description

Large Data Management Jpeg data compression

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:

SEE ALSO

SoGzipDataCompressor, SoDataCompressor, SoJp3dDataCompressor, SoConverterParameters


Constructor & Destructor Documentation

SoJpegDataCompressor::SoJpegDataCompressor (  ) 

Constructor.

virtual SoJpegDataCompressor::~SoJpegDataCompressor (  )  [virtual]

Destructor.


Member Function Documentation

virtual size_t SoJpegDataCompressor::compress ( void *  src,
size_t  srcLen,
const TileInfo tileInfo 
) [virtual]

Compresses the given buffer into the internal buffer.

Parameters:
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.
Returns:
The size in bytes of the compressed buffer.

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).

Returns:
An SbString containing "jpeg".

Implements SoDataCompressor.

virtual bool SoJpegDataCompressor::isLossless (  )  [inline, virtual]

This compression is lossy.

Returns:
false, the compression is lossy.

Implements SoDataCompressor.

virtual size_t SoJpegDataCompressor::uncompress ( void *  dest,
size_t  destLen,
const TileInfo tileInfo 
) [virtual]

Uncompresses data from the internal buffer to the given buffer.

Parameters:
dest a pointer to the destination buffer.
destLen the size of the destination buffer in bytes.
tileInfo contains information about the tile being processed.
Returns:
The number of uncompressed bytes.

Implements SoDataCompressor.


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

Open Inventor Toolkit reference manual, generated on 15 Mar 2023
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/