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:164
static void warning_callback(const char *msg, void *client_data)
sample warning callback expecting a FILE* client object
Definition: jp2k_decoder.c:148
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:587
OPJ_UINT32 numcomps
number of components in the image
Definition: openjpeg.h:719
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:416
OPJ_INT32 * data
image component data
Definition: openjpeg.h:701
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:530
void * opj_stream_t
Definition: openjpeg.h:666
void * opj_codec_t
JPEG2000 codec V2.
Definition: openjpeg.h:618
static void info_callback(const char *msg, void *client_data)
sample debug callback expecting no client object
Definition: jp2k_decoder.c:156
size_t OPJ_SIZE_T
Definition: openjpeg.h:139
void OPJ_CALLCONV opj_image_destroy(opj_image_t *image)
Deallocate any resources associated with an image.
Definition: image.c:91
OPJ_UINT32 sgnd
signed (1) / unsigned (0)
Definition: openjpeg.h:695
OPJ_UINT32 DA_x0
Decoding area left boundary.
Definition: openjpeg.h:581
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:685
OPJ_UINT32 prec
precision: number of bits per component per pixel
Definition: openjpeg.h:691
static void error_callback(const char *msg, void *client_data)
sample error callback expecting a FILE* client object
Definition: jp2k_decoder.c:140
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:1077
#define OPJ_TRUE
Definition: openjpeg.h:117
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:456
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:509
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:683
void OPJ_CALLCONV opj_set_default_decoder_parameters(opj_dparameters_t *parameters)
Set decoding parameters to default values.
Definition: openjpeg.c:382
Decompression parameters.
Definition: openjpeg.h:552
opj_image_comp_t * comps
image components
Definition: openjpeg.h:723
void OPJ_CALLCONV opj_destroy_codec(opj_codec_t *p_codec)
Destroy a decompressor handle.
Definition: openjpeg.c:996
uint32_t OPJ_UINT32
Definition: openjpeg.h:132
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:179
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:585
OPJ_UINT32 DA_x1
Decoding area right boundary.
Definition: openjpeg.h:583
Defines image data and characteristics.
Definition: openjpeg.h:709
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:919
@ OPJ_CODEC_J2K
JPEG-2000 codestream : read/write.
Definition: openjpeg.h:330