OpenDaVINCI
4.16.0
|
#include <JPG.h>
Public Member Functions | |
virtual | ~JPG () |
Static Public Member Functions | |
static bool | compress (void *dest, int &destSize, const uint32_t &width, const uint32_t &height, const uint32_t &bytesPerPixel, const uint8_t *rawImageData, const uint32_t &quality) |
static unsigned char * | decompress (const unsigned char *src, const uint32_t &srcSize, int *width, int *height, int *actualBytesPerPixel, const uint32_t &requestedBytesPerPixel) |
This class provides static methods to compress and decompress data in JPG format.
|
virtual |
|
static |
This method compresses raw image data using a JPG compressor.
dest | Pointer to destination buffer to receive the compressed image data. |
destSize | Size of destination buffer that will be set to the actual amount of bytes used thereof. |
width | Raw image's width. |
height | Raw image's height. |
bytesPerPixel | Raw image's bytes per pixel (channels). |
rawImageDate | Raw image data. |
quality | Compression rate (must be between 1 and 100). |
|
static |
This method decompresses a JPG compressed image.
src | Pointer to a buffer containing the compressed image data. |
srctSize | Size of buffer. |
width | Decompressed image's width. |
height | Decompressed image's height. |
actualBytesPerPixel | Decompressed image's bytes per pixel (channels). |
requestedBytesPerPixel | Expected decompressed image's bytes per pixel (channels). |