Defines the API for the JPEG-HDR mobile decoder library.
More...
Functions |
jh_image_t * | jh_decode (void *buffer, int size, jh_monitor_t *monitor, const jh_decoder_params_t *decoder_params, jh_error_t *error) |
| Decodes the JPEG-HDR data and returns the pointer to an HDR image.
|
void | jh_dispose_image (jh_image_t *image) |
| Disposes the HDRI handle and all the memory associated with it. This memory is allocated in the jh_decode() buffer parameter.
|
const char * | jh_decoder_version () |
| Returns the decoder library version in a formatted string of major.minor.build .
|
int | jh_is_hdr (void *buffer, int size) |
| Determines if the jh_decode() buffer parameter contains a JPEG-HDR file.
|
int | jh_get_size (void *buffer, int size, int *columns, int *rows, int *channels, jh_error_t *error) |
| Determines the size of the image stored in the JPEG-HDR file that is received in the jh_decode() buffer parameter.
|
int | jh_dec_memory_estimate (const jh_decoder_params_t *decoder_params, int *mem, jh_error_t *error) |
| Provides the memory requirements estimate for the decoder.
|
Detailed Description
Defines the API for the JPEG-HDR mobile decoder library.
Function Documentation
Provides the memory requirements estimate for the decoder.
- Returns
- 0 if the function does not succeed.
- Parameters
-
[in] | decoder_params | Decoder parameters. Can be NULL to exclude decoder memory. |
[in,out] | mem | User-allocated variable that returns the amount of required memory, in bytes. |
[in,out] | error | User-allocated error-reporting structure that contains information about the error. |
Decodes the JPEG-HDR data and returns the pointer to an HDR image.
- Returns
- Pointer to the HDR image if the function succeeds. NULL if the function does not succeed.
- Note
- All the memory associated with the HDRI handle is allocated in the jh_decode()
buffer
parameter. See jh_dispose_image().
- jh_decode() should not be called if jh_is_hdr() returns 0.
- jh_dispose_image() must be called after jh_decode() is called and as many times as jh_decode() is successfully executed.
- Parameters
-
[in] | buffer | Input data byte buffer or memory-mapped file with JPEG-HDR. |
[in] | size | Buffer size, in bytes. |
[in] | monitor | Progress status of the function. Initial value of the jh_monitor_ts cancel field must be 0. |
[in] | decoder_params | Decoder parameters. |
[in,out] | error | User-allocated error-reporting structure that contains information about the error. |
const char* jh_decoder_version |
( |
| ) |
|
Returns the decoder library version in a formatted string of major.minor.build
.
- Returns
- The library version in a null-terminated character string.
Disposes the HDRI handle and all the memory associated with it. This memory is allocated in the jh_decode() buffer
parameter.
- Note
- This function must be called after jh_decode() is called and as many times as jh_decode() is successfully executed. jh_decode() succeeds when it returns a pointer to an HDR image.
- Parameters
-
[in] | image | HDRI handle. NULL is allowed. |
int jh_get_size |
( |
void * |
buffer, |
|
|
int |
size, |
|
|
int * |
columns, |
|
|
int * |
rows, |
|
|
int * |
channels, |
|
|
jh_error_t * |
error |
|
) |
| |
Determines the size of the image stored in the JPEG-HDR file that is received in the jh_decode() buffer
parameter.
- Returns
- Description of the return value, which is a string.
- Parameters
-
[in] | buffer | Pointer to the jh_decode() buffer parameter. |
[in] | size | Buffer size, in bytes. |
[in] | columns | Number of columns in the image. |
[out] | rows | Number of rows in the image. |
[out] | channels | Number of channels in the image. |
[in,out] | error | User-allocated error-reporting structure that contains information about the error. |
int jh_is_hdr |
( |
void * |
buffer, |
|
|
int |
size |
|
) |
| |
Determines if the jh_decode() buffer
parameter contains a JPEG-HDR file.
- Note
- jh_decode() should not be called if this function returns 0.
- Returns
- 0 if no JPEG-HDR file is detected.
- Parameters
-
[in] | buffer | Pointer to the jh_decode() buffer parameter. |
[in] | size | Buffer size, in bytes. |