|
|
This method compresses image data using the JPEG compression algorithms supplied by the IJG JPEG compression library.
In an attempt to provide flexible and fast performance, the function will allow pdst to already be allocated. As long as pdstsize contains a value that is the same size as pdst's buffer size, everything should work accordingly. This will allow one to call this function with unfluctuating image dimensions and formats and no obvious allocations will take place within the inner compresion loop.
- Parameters:
-
[in] | compress_info | A ph_cinfo_handle that was initialized with the ph_jpeg_new_compress function. |
[in] | src | A pointer to image data |
[in] | srcsize | The size of the image data pointed to by src |
[in] | width | The width of the image data pointed to by src |
[in] | height | The height of the image data pointed to by src |
[in] | format | The Phission format of the image data pointed to by src. Valid values are phImageRGB24 or phImageGREY8. |
[in] | quality | The quality 0-100 of the JPEG compression |
[in,out] | pdst | A buffer that points to the JPEG compressed data. This data may have been already allocated and the size value stored in pdstsize should correspond to the size of the pdst buffer. |
[in,out] | pdstsize | A pointer to an integer that will have the size of the JPEG compressed image data buffer stored in pdst. The pdst buffer may have been previously allocated by this function and this integer value should correspond to the size of pdst |
- Returns:
- The success or failure of the JPEG compression.
- Return values:
-
Definition at line 995 of file ImageJPEG.c. |
|