![]() |
TerraLib 4.1
|
A wrapper around the libjpeg provinding higher level C++ functions. More...
Functions | |
| bool | ReadFileParams (const string &fileName, int &width, int &height, int &nChannels) |
| bool | DecompressFile (const string &fileName, unsigned char *dstBuffer, int &width, int &height, int &nChannels) |
| bool | DecompressBuffer (unsigned char *srcBuffer, int size, unsigned char *dstBuffer, int &width, int &height, int &bpp) |
| bool | CompressToFile (unsigned char *buffer, int width, int height, int bpp, const string &fileName, int quality=75) |
| bool | CompressToBuffer (unsigned char *srcBuffer, int width, int height, int bpp, unsigned char *dstBuffer, int &len, int quality) |
| TL_DLL bool | ReadFileParams (const std::string &fileName, int &width, int &height, int &nChannels) |
| TL_DLL bool | DecompressFile (const std::string &fileName, unsigned char *dstBuffer, int &width, int &height, int &nChannels) |
| TL_DLL bool | CompressToFile (unsigned char *buffer, int width, int height, int bpp, const std::string &fileName, int quality=75) |
A wrapper around the libjpeg provinding higher level C++ functions.
| TL_DLL bool Jpeg::CompressToBuffer | ( | unsigned char * | srcBuffer, |
| int | width, | ||
| int | height, | ||
| int | bpp, | ||
| unsigned char * | dstBuffer, | ||
| int & | len, | ||
| int | quality = 75 |
||
| ) |
Compresses an image buffer to a JPEG image in memory
| srcBuffer | address of the image in memory |
| width | width of image in pixels |
| height | height of image in pixels |
| bpp | number of bytes per pixel (1 or 3) |
| dstBuffer | pointer to a buffer to buffer to return the compressed data. The function assumes that it was allocated with enough space to hold the compressed data |
| len | returns the size of the compressed data. Initially this parameter should contain the size of the pre-allocated buffer |
| quality | image quality as a percentage |
| bool Jpeg::CompressToFile | ( | unsigned char * | buffer, |
| int | width, | ||
| int | height, | ||
| int | bpp, | ||
| const string & | fileName, | ||
| int | quality = 75 |
||
| ) |
| TL_DLL bool Jpeg::CompressToFile | ( | unsigned char * | buffer, |
| int | width, | ||
| int | height, | ||
| int | bpp, | ||
| const std::string & | fileName, | ||
| int | quality = 75 |
||
| ) |
Compresses an image buffer to a JPEG image file
| buffer | address of the buffer that contains the image in memory |
| width | width of image in pixels |
| height | height of image in pixels |
| bpp | number of bytes per pixel (1 or 3) |
| fileName | name of the compressed file |
| quality | image quality as a percentage value |
| TL_DLL bool Jpeg::DecompressBuffer | ( | unsigned char * | srcBuffer, |
| int | size, | ||
| unsigned char * | dstBuffer, | ||
| int & | width, | ||
| int & | height, | ||
| int & | bpp | ||
| ) |
Decompresses a JPEG image buffer to a buffer in memory
| srcBuffer | memory address containing jpeg compressed data |
| size | size in bytes of the jpeg compressed data |
| dstBuffer | pointer to a buffer to return the decompressed data. The function assumes that it was allocated with enough space to hold the decompressed data |
| width | return the number of columns of the data |
| height | return the number of lines of the data |
| bpp | return the number of bytes per pixel |
| TL_DLL bool Jpeg::DecompressFile | ( | const std::string & | fileName, |
| unsigned char * | dstBuffer, | ||
| int & | width, | ||
| int & | height, | ||
| int & | nChannels | ||
| ) |
Reads and decompresses a JPEG image file to a buffer in memory
| fileName | name of the file |
| dstBuffer | pointer to a buffer to return the decompressed data. The function assumes that it was allocated with enough space to hold the decompressed data |
| width | returns the number of columns of the data |
| height | returns the number of lines of the data |
| nChannels | returns the number of bands, or channels, of the data |
| bool Jpeg::DecompressFile | ( | const string & | fileName, |
| unsigned char * | dstBuffer, | ||
| int & | width, | ||
| int & | height, | ||
| int & | nChannels | ||
| ) |
| bool Jpeg::ReadFileParams | ( | const string & | fileName, |
| int & | width, | ||
| int & | height, | ||
| int & | nChannels | ||
| ) |
| TL_DLL bool Jpeg::ReadFileParams | ( | const std::string & | fileName, |
| int & | width, | ||
| int & | height, | ||
| int & | nChannels | ||
| ) |
Reads the main informations about a JPEG image file
| fileName | name of the file |
| width | return the number of columns of the data |
| height | return the number of lines of the data |
| nChannels | return the number of bands, or channels, of the data |