Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

int ph_jpeg_compress ph_cinfo_handle  compress_info,
uint8_t src,
uint32_t  srcsize,
uint32_t  width,
uint32_t  height,
int32_t  format,
int  quality,
uint8_t **  pdst,
uint32_t pdstsize
 

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:
phSUCCESS 
phFAIL 

Definition at line 995 of file ImageJPEG.c.





Copyright (C) 2002 - 2007 Philip D.S. Thoren ( pthoren@users.sourceforge.net )
University Of Massachusetts at Lowell
Robotics Lab
SourceForge.net Logo

Generated on Sat Jun 16 02:45:27 2007 for phission by  doxygen 1.4.4