Go to the documentation of this file.
35 #if defined(_MSC_VER) || defined(__BORLANDC__)
38 #define int64 long long
#define opj_free(m)
Deallocates or frees a memory block.
Definition: opj_malloc.h:152
int cio_numbytesleft(opj_cio_t *cio)
Number of bytes left before the end of the stream.
Definition: cio.c:121
#define opj_malloc(size)
Allocate an uninitialized memory block.
Definition: opj_malloc.h:51
unsigned char * cio_getbp(opj_cio_t *cio)
Get pointer to the current position in the stream.
Definition: cio.c:129
JPEG-2000 codestream reader/writer.
Definition: j2k.h:314
JPEG-2000 file format reader/writer.
Definition: jp2.h:120
int length
buffer size in bytes
Definition: openjpeg.h:484
opj_cio_t *OPJ_CALLCONV opj_cio_open(opj_common_ptr cinfo, unsigned char *buffer, int length)
Open and allocate a memory stream for read / write.
Definition: cio.c:37
void OPJ_CALLCONV opj_cio_close(opj_cio_t *cio)
Close and free a CIO handle.
Definition: cio.c:83
@ CODEC_JP2
JPEG-2000 file format : read/write.
Definition: openjpeg.h:149
#define int64
Definition: cio.h:38
Coding parameters.
Definition: j2k.h:204
#define OPJ_STREAM_READ
The stream was opened for reading.
Definition: openjpeg.h:468
unsigned int cio_read(opj_cio_t *cio, int n)
Read some bytes.
Definition: cio.c:183
unsigned int cio_write(opj_cio_t *cio, unsigned int64 v, int n)
Write some bytes.
Definition: cio.c:167
int openmode
open mode (read/write) either OPJ_STREAM_READ or OPJ_STREAM_WRITE
Definition: openjpeg.h:480
unsigned char cio_bytein(opj_cio_t *cio)
Definition: cio.c:148
Byte input-output stream (CIO)
Definition: openjpeg.h:475
int cio_numbytesleft(opj_cio_t *cio)
Number of bytes left before the end of the stream.
Definition: cio.c:121
unsigned char * end
pointer to the end of the stream
Definition: openjpeg.h:489
unsigned int cio_write(opj_cio_t *cio, unsigned int64 v, int n)
Write some bytes.
Definition: cio.c:167
int OPJ_CALLCONV cio_tell(opj_cio_t *cio)
Get position in byte stream.
Definition: cio.c:100
#define OPJ_TRUE
Definition: openjpeg.h:64
opj_bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt,...)
Write formatted data to a string and send the string to a user callback.
Definition: event.c:76
void cio_skip(opj_cio_t *cio, int n)
Skip some bytes.
Definition: cio.c:198
Definition: openjpeg.h:430
unsigned char * bp
pointer to the current position
Definition: openjpeg.h:491
unsigned char * start
pointer to the start of the stream
Definition: openjpeg.h:487
int opj_bool
Definition: openjpeg.h:63
#define OPJ_STREAM_WRITE
The stream was opened for writing.
Definition: openjpeg.h:470
opj_common_ptr cinfo
codec context
Definition: openjpeg.h:477
unsigned int cio_read(opj_cio_t *cio, int n)
Read some bytes.
Definition: cio.c:183
void OPJ_CALLCONV cio_seek(opj_cio_t *cio, int pos)
Set position in byte stream.
Definition: cio.c:109
int img_size
Size of the image in bits.
Definition: j2k.h:210
#define EVT_ERROR
Error event type.
Definition: event.h:35
opj_bool cio_byteout(opj_cio_t *cio, unsigned char v)
Definition: cio.c:136
unsigned char * cio_getbp(opj_cio_t *cio)
Get pointer to the current position in the stream.
Definition: cio.c:129
void cio_skip(opj_cio_t *cio, int n)
Skip some bytes.
Definition: cio.c:198
#define OPJ_FALSE
Definition: openjpeg.h:65
#define OPJ_CALLCONV
Definition: openjpeg.h:45
@ CODEC_J2K
JPEG-2000 codestream : read/write.
Definition: openjpeg.h:147
unsigned char * buffer
pointer to the start of the buffer
Definition: openjpeg.h:482