Callback structure provided by the RIP to the JPEG implementation, for access to RIP memory handling and JPEG data source. More...
#include "jpegapi.h"
Data Fields | |
size_t | size |
Size of this structure. More... | |
void *(* | alloc )(size_t size) |
Allocate a block of memory from the RIP. More... | |
void(* | free )(void *memory) |
Free a block of memory previously allocated from the RIP. More... | |
HqBool(* | source )(void *source_data, size_t *bytes_read, const uint8 **buffer) |
Callback to read the underlying source. More... | |
Callback structure provided by the RIP to the JPEG implementation, for access to RIP memory handling and JPEG data source.
The JPEG implementation should copy the callback pointers provided in this structure into its own memory, and use them to allocate and free memory required to decode the JPEG data, and access the raw compressed JPEG source data.
void*( * jpeg_callbacks::alloc) (size_t size) |
Allocate a block of memory from the RIP.
size | The size of the block of memory to allocate. |
The JPEG implementation should use this call in preference to system malloc() so that the RIP can account for the memory used and handle low memory situations effectively.
void( * jpeg_callbacks::free) (void *memory) |
Free a block of memory previously allocated from the RIP.
memory | A memory pointer previously returned by the jpeg_callbacks::alloc() call. After calling this function, the memory should not be dereferenced. |
size_t jpeg_callbacks::size |
Size of this structure.
This must be set correctly so that parameters for new versions of the JPEG API will be set to sensible default values if linked with older clients.
Callback to read the underlying source.
[in] | source_data | The opaque data source, as provided to the decompress_init() call. |
[out] | bytes_read | A pointer to the number of bytes read from the source. If no data was read, this will be set to zero. |
[out] | buffer | A pointer to the data buffer read from the source. If no data was read, this will be set to NULL. |
TRUE | If the call read data from the image source. |
FALSE | If there was no more data to read, or there was an error reading data from the image source. |