Project Name  Version 1.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Data Structures | Typedefs | Functions
Decoder Interface

Defines the API for the JPEG-HDR mobile decoder library. More...

Data Structures

struct  jh_decoder_params_ts
 Defines the JPEG-HDR mobile decoder parameters. More...

Typedefs

typedef struct jh_decoder_params_ts jh_decoder_params_t
 Defines the JPEG-HDR mobile decoder parameters.

Functions

jh_image_tjh_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

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.

Returns
0 if the function does not succeed.
Parameters
[in]decoder_paramsDecoder parameters. Can be NULL to exclude decoder memory.
[in,out]memUser-allocated variable that returns the amount of required memory, in bytes.
[in,out]errorUser-allocated error-reporting structure that contains information about the error.
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.

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]bufferInput data byte buffer or memory-mapped file with JPEG-HDR.
[in]sizeBuffer size, in bytes.
[in]monitorProgress status of the function. Initial value of the jh_monitor_ts cancel field must be 0.
[in]decoder_paramsDecoder parameters.
[in,out]errorUser-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.
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.

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]imageHDRI 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]bufferPointer to the jh_decode() buffer parameter.
[in]sizeBuffer size, in bytes.
[in]columnsNumber of columns in the image.
[out]rowsNumber of rows in the image.
[out]channelsNumber of channels in the image.
[in,out]errorUser-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]bufferPointer to the jh_decode() buffer parameter.
[in]sizeBuffer size, in bytes.