Classes | |
struct | InputSource |
Input source for PNG decompression manager. More... | |
struct | OutputSource |
Output source for PNG compression manager. More... | |
Functions | |
CX_UTILS_DLL int | DecompressImage (const unsigned char *png, const unsigned int pngSize, unsigned char **image, unsigned short *width, unsigned short *height, unsigned char *channels) |
Takes PNG data inside of a buffer and decompresses it to another buffer which will store the raw image. | |
CX_UTILS_DLL int | CompressImage (const unsigned short width, const unsigned short height, const unsigned char channels, const unsigned char *image, unsigned char **png, unsigned int *pngBufferSize, unsigned int *pngSize) |
Compresses RAW image data to PNG format. | |
void | ReadData (png_structp png_ptr, png_bytep data, png_size_t length) |
void | WriteData (png_structp png_ptr, png_bytep data, png_size_t length) |
int CxUtils::PNG::CompressImage | ( | const unsigned short | width, |
const unsigned short | height, | ||
const unsigned char | channels, | ||
const unsigned char * | image, | ||
unsigned char ** | png, | ||
unsigned int * | pngBufferSize, | ||
unsigned int * | pngSize | ||
) |
Compresses RAW image data to PNG format.
[in] | image | Pointer to raw image data that needs to be compressed. Data must be in BGR channel format. |
[in] | width | The width of the image. |
[in] | height | The height of the image. |
[in] | channels | The number of channels in the image. |
[out] | png | Pointer to buffer which will store resulting PNG data. If NULL or too small this buffer will grow dynamically. |
[out] | pngBufferSize | The size of the buffer in bytes holding the compressed PNG. |
[out] | pngSize | The size of the PNG data inside the buffer in bytes. |
int CxUtils::PNG::DecompressImage | ( | const unsigned char * | png, |
const unsigned int | pngSize, | ||
unsigned char ** | image, | ||
unsigned short * | width, | ||
unsigned short * | height, | ||
unsigned char * | channels | ||
) |
Takes PNG data inside of a buffer and decompresses it to another buffer which will store the raw image.
[in] | png | Pointer to PNG data. |
[in] | pngSize | The size in bytes of the PNG data. |
[out] | image | Pointer to buffer which will store the result. If NULL or too small new memory will be allocated dynamically. Decompressed data will be in BGR format. |
[out] | width | The width of the image decompressed. |
[out] | height | The height of the image decompressed. |
[out] | channels | The number of channels in the decompressed image. |
void CxUtils::PNG::ReadData | ( | png_structp | png_ptr, |
png_bytep | data, | ||
png_size_t | length | ||
) |