Wrapper class to the IJG JPEG library.
More...
#include <JPEGCompressor.h>
List of all members.
Public Member Functions |
| | JPEGCompressor (int quality) |
| | Constructor.
|
| void | setQuality (int factor) |
| | Set the compression quality.
|
|
int | getQuality () |
| | Get the current quality level.
|
| void | InitCompression (RawTile &rawtile, unsigned int strip_height) throw (std::string) |
| | Initialise strip based compression.
|
| unsigned int | CompressStrip (unsigned char *s, unsigned int tile_height) throw (std::string) |
| | Compress a strip of image data.
|
|
unsigned int | Finish () throw (std::string) |
| | Finish the strip based compression and free memory.
|
| int | Compress (RawTile &t) throw (std::string) |
| | Compress an entire buffer of image data at once in one command.
|
|
unsigned int | getHeaderSize () |
| | Return the JPEG header size.
|
|
unsigned char * | getHeader () |
| | Return a pointer to the header itself.
|
Detailed Description
Wrapper class to the IJG JPEG library.
Constructor & Destructor Documentation
| JPEGCompressor::JPEGCompressor |
( |
int |
quality | ) |
[inline] |
Constructor.
- Parameters:
-
| quality | JPEG Quality factor (0-100) |
Member Function Documentation
| int JPEGCompressor::Compress |
( |
RawTile & |
t | ) |
throw (std::string) |
Compress an entire buffer of image data at once in one command.
- Parameters:
-
| unsigned int JPEGCompressor::CompressStrip |
( |
unsigned char * |
s, |
|
|
unsigned int |
tile_height |
|
) |
| throw (std::string) |
Compress a strip of image data.
- Parameters:
-
| s | source image data |
| tile_height | pixel height of the tile we are compressing |
| void JPEGCompressor::InitCompression |
( |
RawTile & |
rawtile, |
|
|
unsigned int |
strip_height |
|
) |
| throw (std::string) |
Initialise strip based compression.
If we are doing a strip based encoding, we need to first initialise with InitCompression, then compress a single strip at a time using CompressStrip and finally clean up using Finish
- Parameters:
-
| rawtile | tile containing the image to be compressed |
| strip_height | pixel height of the strip we want to compress |
| void JPEGCompressor::setQuality |
( |
int |
factor | ) |
[inline] |
Set the compression quality.
- Parameters:
-
| factor | Quality factor (0-100) |
The documentation for this class was generated from the following file: