Go to the documentation of this file.
31 #ifndef JP2K_DECODER_H_
32 # define JP2K_DECODER_H_
OPJ_BOOL OPJ_CALLCONV opj_set_error_handler(opj_codec_t *p_codec, opj_msg_callback p_callback, void *p_user_data)
Set the error handler use by openjpeg.
Definition: openjpeg.c:74
static Byte_t * imagetopnm(opj_image_t *image, ihdrbox_param_t **ihdrbox)
Definition: jp2k_decoder.c:162
static void warning_callback(const char *msg, void *client_data)
sample warning callback expecting a FILE* client object
Definition: jp2k_decoder.c:146
OPJ_BOOL OPJ_CALLCONV opj_set_info_handler(opj_codec_t *p_codec, opj_msg_callback p_callback, void *p_user_data)
Set the info handler use by openjpeg.
Definition: openjpeg.c:44
OPJ_UINT32 DA_y1
Decoding area bottom boundary.
Definition: openjpeg.h:547
OPJ_UINT32 numcomps
number of components in the image
Definition: openjpeg.h:679
OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec, opj_dparameters_t *parameters)
Setup the decoder with decompression parameters provided by the user and with the message handler pro...
Definition: openjpeg.c:398
OPJ_INT32 * data
image component data
Definition: openjpeg.h:661
uint8_t Byte_t
Definition: byte_manager.h:37
OPJ_BOOL OPJ_CALLCONV opj_set_decode_area(opj_codec_t *p_codec, opj_image_t *p_image, OPJ_INT32 p_start_x, OPJ_INT32 p_start_y, OPJ_INT32 p_end_x, OPJ_INT32 p_end_y)
Sets the given area to be decoded.
Definition: openjpeg.c:492
void * opj_stream_t
Definition: openjpeg.h:626
void * opj_codec_t
JPEG2000 codec V2.
Definition: openjpeg.h:578
static void info_callback(const char *msg, void *client_data)
sample debug callback expecting no client object
Definition: jp2k_decoder.c:154
size_t OPJ_SIZE_T
Definition: openjpeg.h:133
void OPJ_CALLCONV opj_image_destroy(opj_image_t *image)
Deallocate any resources associated with an image.
Definition: image.c:92
OPJ_UINT32 sgnd
signed (1) / unsigned (0)
Definition: openjpeg.h:655
OPJ_UINT32 DA_x0
Decoding area left boundary.
Definition: openjpeg.h:541
Byte_t * j2k_to_pnm(const char *fn, ihdrbox_param_t **ihdrbox)
Definition: jp2k_decoder.c:46
OPJ_UINT32 h
data height
Definition: openjpeg.h:645
OPJ_UINT32 prec
precision
Definition: openjpeg.h:651
static void error_callback(const char *msg, void *client_data)
sample error callback expecting a FILE* client object
Definition: jp2k_decoder.c:138
Byte4_t width
Definition: ihdrbox_manager.h:41
opj_stream_t *OPJ_CALLCONV opj_stream_create_default_file_stream(const char *fname, OPJ_BOOL p_is_read_stream)
Create a stream from a file identified with its filename with default parameters (helper function)
Definition: openjpeg.c:1002
#define OPJ_TRUE
Definition: openjpeg.h:111
OPJ_BOOL OPJ_CALLCONV opj_read_header(opj_stream_t *p_stream, opj_codec_t *p_codec, opj_image_t **p_image)
Decodes an image header.
Definition: openjpeg.c:418
OPJ_BOOL OPJ_CALLCONV opj_decode(opj_codec_t *p_codec, opj_stream_t *p_stream, opj_image_t *p_image)
Decode an image from a JPEG-2000 codestream.
Definition: openjpeg.c:471
OPJ_BOOL OPJ_CALLCONV opj_set_warning_handler(opj_codec_t *p_codec, opj_msg_callback p_callback, void *p_user_data)
Set the warning handler use by openjpeg.
Definition: openjpeg.c:59
OPJ_UINT32 w
data width
Definition: openjpeg.h:643
void OPJ_CALLCONV opj_set_default_decoder_parameters(opj_dparameters_t *parameters)
Set decoding parameters to default values.
Definition: openjpeg.c:364
Decompression parameters.
Definition: openjpeg.h:512
opj_image_comp_t * comps
image components
Definition: openjpeg.h:683
void OPJ_CALLCONV opj_destroy_codec(opj_codec_t *p_codec)
Destroy a decompressor handle.
Definition: openjpeg.c:921
uint32_t OPJ_UINT32
Definition: openjpeg.h:126
void OPJ_CALLCONV opj_stream_destroy(opj_stream_t *p_stream)
Destroys a stream created by opj_create_stream.
Definition: cio.c:199
opj_codec_t *OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
Creates a J2K/JP2 decompression structure.
Definition: openjpeg.c:168
uint16_t Byte2_t
Definition: byte_manager.h:38
I.5.3.1 Image Header box.
Definition: ihdrbox_manager.h:39
Byte_t * j2k_to_pnm(const char *fn, ihdrbox_param_t **ihdrbox)
Definition: jp2k_decoder.c:46
OPJ_UINT32 DA_y0
Decoding area up boundary.
Definition: openjpeg.h:545
OPJ_UINT32 DA_x1
Decoding area right boundary.
Definition: openjpeg.h:543
Defines image data and characteristics.
Definition: openjpeg.h:669
OPJ_BOOL OPJ_CALLCONV opj_end_decompress(opj_codec_t *p_codec, opj_stream_t *p_stream)
Read after the codestream if necessary.
Definition: openjpeg.c:844
@ OPJ_CODEC_J2K
JPEG-2000 codestream : read/write.
Definition: openjpeg.h:294