OpenJPEG  1.5.1
jp2.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002-2007, Communications and Remote Sensing Laboratory, Universite catholique de Louvain (UCL), Belgium
3  * Copyright (c) 2002-2007, Professor Benoit Macq
4  * Copyright (c) 2002-2003, Yannick Verschueren
5  * Copyright (c) 2005, Herve Drolon, FreeImage Team
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  * 1. Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * 2. Redistributions in binary form must reproduce the above copyright
14  * notice, this list of conditions and the following disclaimer in the
15  * documentation and/or other materials provided with the distribution.
16  *
17  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
18  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27  * POSSIBILITY OF SUCH DAMAGE.
28  */
29 #ifndef __JP2_H
30 #define __JP2_H
31 
39 
40 #define JPIP_JPIP 0x6a706970
41 
42 #define JP2_JP 0x6a502020
43 #define JP2_FTYP 0x66747970
44 #define JP2_JP2H 0x6a703268
45 #define JP2_IHDR 0x69686472
46 #define JP2_COLR 0x636f6c72
47 #define JP2_JP2C 0x6a703263
48 #define JP2_URL 0x75726c20
49 #define JP2_DTBL 0x6474626c
50 #define JP2_BPCC 0x62706363
51 #define JP2_JP2 0x6a703220
52 #define JP2_PCLR 0x70636c72
53 #define JP2_CMAP 0x636d6170
54 #define JP2_CDEF 0x63646566
56 /* ----------------------------------------------------------------------- */
57 
60 typedef struct opj_jp2_cdef_info
61 {
62  unsigned short cn, typ, asoc;
64 
68 typedef struct opj_jp2_cdef
69 {
71  unsigned short n;
73 
77 typedef struct opj_jp2_cmap_comp
78 {
79  unsigned short cmp;
80  unsigned char mtyp, pcol;
82 
86 typedef struct opj_jp2_pclr
87 {
88  unsigned int *entries;
89  unsigned char *channel_sign;
90  unsigned char *channel_size;
92  unsigned short nr_entries, nr_channels;
94 
98 typedef struct opj_jp2_color
99 {
100  unsigned char *icc_profile_buf;
102 
105  unsigned char jp2_has_colr;
107 
111 typedef struct opj_jp2_comps {
112  int depth;
113  int sgnd;
114  int bpcc;
116 
120 typedef struct opj_jp2 {
125  unsigned int w;
126  unsigned int h;
127  unsigned int numcomps;
128  unsigned int bpc;
129  unsigned int C;
130  unsigned int UnkC;
131  unsigned int IPR;
132  unsigned int meth;
133  unsigned int approx;
134  unsigned int enumcs;
135  unsigned int precedence;
136  unsigned int brand;
137  unsigned int minversion;
138  unsigned int numcl;
139  unsigned int *cl;
141  unsigned int j2k_codestream_offset;
142  unsigned int j2k_codestream_length;
146 
150 typedef struct opj_jp2_box {
151  int length;
152  int type;
153  int init_pos;
155 
158 /* ----------------------------------------------------------------------- */
164 void jp2_write_jp2h(opj_jp2_t *jp2, opj_cio_t *cio);
190 void jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters);
217 void jp2_setup_encoder(opj_jp2_t *jp2, opj_cparameters_t *parameters, opj_image_t *image);
227 
228 /* ----------------------------------------------------------------------- */
232 
233 #endif /* __JP2_H */
234 
opj_jp2_cdef_info::typ
unsigned short typ
Definition: jp2.h:62
jp2_write_jp2h
void jp2_write_jp2h(opj_jp2_t *jp2, opj_cio_t *cio)
Write the JP2H box - JP2 Header box (used in MJ2)
Definition: jp2.c:813
opj_jp2_box_t
struct opj_jp2_box opj_jp2_box_t
JP2 Box.
opj_jp2_pclr
Palette data: table entries, palette columns.
Definition: jp2.h:87
opj_free
#define opj_free(m)
Deallocates or frees a memory block.
Definition: opj_malloc.h:152
cio_numbytesleft
int cio_numbytesleft(opj_cio_t *cio)
Number of bytes left before the end of the stream.
Definition: cio.c:121
opj_image::x1
int x1
Xsiz: width of the reference grid.
Definition: openjpeg.h:539
jp2_setup_decoder
void jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters)
Setup the decoder decoding parameters using user parameters.
Definition: jp2.c:1105
opj_jp2::w
unsigned int w
Definition: jp2.h:125
opj_malloc
#define opj_malloc(size)
Allocate an uninitialized memory block.
Definition: opj_malloc.h:51
opj_jp2_cmap_comp::pcol
unsigned char pcol
Definition: jp2.h:80
write_fidx
static int write_fidx(int offset_jp2c, int length_jp2c, int offset_idx, int length_idx, opj_cio_t *cio)
Write file Index (superbox)
Definition: jp2.c:1012
opj_jp2_pclr::cmap
opj_jp2_cmap_comp_t * cmap
Definition: jp2.h:91
opj_jp2_box::type
int type
Definition: jp2.h:152
CLRSPC_SYCC
@ CLRSPC_SYCC
YUV.
Definition: openjpeg.h:135
JP2_JP2
#define JP2_JP2
File type fields.
Definition: jp2.h:51
opj_j2k
JPEG-2000 codestream reader/writer.
Definition: j2k.h:314
jp2_write_jp2h
void jp2_write_jp2h(opj_jp2_t *jp2, opj_cio_t *cio)
Write the JP2H box - JP2 Header box (used in MJ2)
Definition: jp2.c:813
opj_jp2
JPEG-2000 file format reader/writer.
Definition: jp2.h:120
opj_jp2::UnkC
unsigned int UnkC
Definition: jp2.h:130
OPJ_ARG_NOT_USED
#define OPJ_ARG_NOT_USED(x)
Definition: openjpeg.h:68
jp2_read_jp2h
opj_bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio, opj_jp2_color_t *color)
Read the JP2H box - JP2 Header box (used in MJ2)
Definition: jp2.c:648
opj_jp2_color::icc_profile_len
int icc_profile_len
Definition: jp2.h:101
opj_image_comp::prec
int prec
precision
Definition: openjpeg.h:517
opj_cparameters::jpip_on
opj_bool jpip_on
Enable JPIP indexing.
Definition: openjpeg.h:355
opj_jp2::j2k_codestream_length
unsigned int j2k_codestream_length
Definition: jp2.h:142
opj_jp2::j2k_codestream_offset
unsigned int j2k_codestream_offset
Definition: jp2.h:141
opj_jp2_cdef_info_t
struct opj_jp2_cdef_info opj_jp2_cdef_info_t
Channel description: channel index, type, assocation.
j2k_destroy_decompress
void j2k_destroy_decompress(opj_j2k_t *j2k)
Destroy a J2K decompressor handle.
Definition: j2k.c:1835
jp2_read_jp2h
opj_bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio, opj_jp2_color_t *color)
Read the JP2H box - JP2 Header box (used in MJ2)
Definition: jp2.c:648
j2k_create_decompress
opj_j2k_t * j2k_create_decompress(opj_common_ptr cinfo)
Creates a J2K decompression structure.
Definition: j2k.c:1818
jp2_write_colr
static void jp2_write_colr(opj_jp2_t *jp2, opj_cio_t *cio)
Definition: jp2.c:313
opj_jp2_cdef_info
Channel description: channel index, type, assocation.
Definition: jp2.h:61
opj_jp2_pclr_t
struct opj_jp2_pclr opj_jp2_pclr_t
Palette data: table entries, palette columns.
opj_jp2_color::jp2_pclr
opj_jp2_pclr_t * jp2_pclr
Definition: jp2.h:104
opj_jp2::numcomps
unsigned int numcomps
Definition: jp2.h:127
opj_image::color_space
OPJ_COLOR_SPACE color_space
color space: sRGB, Greyscale or YUV
Definition: openjpeg.h:545
jp2_write_ihdr
static void jp2_write_ihdr(opj_jp2_t *jp2, opj_cio_t *cio)
Definition: jp2.c:244
jp2_free_pclr
static void jp2_free_pclr(opj_jp2_color_t *color)
Definition: jp2.c:335
jp2_write_jp
static void jp2_write_jp(opj_cio_t *cio)
Definition: jp2.c:957
JP2_URL
#define JP2_URL
URL box.
Definition: jp2.h:48
opj_image_comp
Defines a single image component.
Definition: openjpeg.h:503
opj_calloc
#define opj_calloc(num, size)
Allocate a memory block with elements initialized to 0.
Definition: opj_malloc.h:63
opj_image_comp::sgnd
int sgnd
signed (1) / unsigned (0)
Definition: openjpeg.h:521
jp2_destroy_compress
void jp2_destroy_compress(opj_jp2_t *jp2)
Destroy a JP2 compressor handle.
Definition: jp2.c:1130
jp2_create_decompress
opj_jp2_t * jp2_create_decompress(opj_common_ptr cinfo)
Creates a JP2 decompression structure.
Definition: jp2.c:1076
opj_jp2_cdef_info::asoc
unsigned short asoc
Definition: jp2.h:62
opj_jp2::ignore_pclr_cmap_cdef
opj_bool ignore_pclr_cmap_cdef
Definition: jp2.h:144
j2k_create_compress
opj_j2k_t * j2k_create_compress(opj_common_ptr cinfo)
Creates a J2K compression structure.
Definition: j2k.c:2119
cio_read
unsigned int cio_read(opj_cio_t *cio, int n)
Read some bytes.
Definition: cio.c:183
opj_jp2_cmap_comp_t
struct opj_jp2_cmap_comp opj_jp2_cmap_comp_t
Component mappings: channel index, mapping type, palette index.
opj_jp2::enumcs
unsigned int enumcs
Definition: jp2.h:134
opj_cparameters
Compression parameters.
Definition: openjpeg.h:230
jp2_read_struct
static opj_bool jp2_read_struct(opj_jp2_t *jp2, opj_cio_t *cio, opj_jp2_color_t *color)
Decode the structure of a JP2 file.
Definition: jp2.c:997
opj_jp2_comps_t
struct opj_jp2_comps opj_jp2_comps_t
JP2 component.
opj_jp2_color
Collector for ICC profile, palette, component mapping, channel description.
Definition: jp2.h:99
opj_jp2_pclr::nr_entries
unsigned short nr_entries
Definition: jp2.h:92
opj_jp2_pclr::channel_sign
unsigned char * channel_sign
Definition: jp2.h:89
opj_j2k::cinfo
opj_common_ptr cinfo
codec context
Definition: j2k.h:316
opj_jp2_pclr::channel_size
unsigned char * channel_size
Definition: jp2.h:90
jp2_write_jp2c
static int jp2_write_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info)
Definition: jp2.c:904
JP2_JP2H
#define JP2_JP2H
JP2 header box.
Definition: jp2.h:44
JP2_IHDR
#define JP2_IHDR
Image header box.
Definition: jp2.h:45
opj_image_comp::w
int w
data width
Definition: openjpeg.h:509
opj_jp2::jpip_on
opj_bool jpip_on
Definition: jp2.h:143
opj_image::x0
int x0
XOsiz: horizontal offset from the origin of the reference grid to the left side of the image area.
Definition: openjpeg.h:535
opj_jp2_encode
opj_bool opj_jp2_encode(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info)
Encode an image into a JPEG-2000 file stream.
Definition: jp2.c:1212
opj_jp2_color::jp2_has_colr
unsigned char jp2_has_colr
Definition: jp2.h:105
opj_dparameters::flags
unsigned int flags
Definition: openjpeg.h:412
cio_write
unsigned int cio_write(opj_cio_t *cio, unsigned int64 v, int n)
Write some bytes.
Definition: cio.c:167
opj_includes.h
opj_cio
Byte input-output stream (CIO)
Definition: openjpeg.h:475
opj_jp2::bpc
unsigned int bpc
Definition: jp2.h:128
jp2_setup_encoder
void jp2_setup_encoder(opj_jp2_t *jp2, opj_cparameters_t *parameters, opj_image_t *image)
Setup the encoder parameters using the current image and using user parameters.
Definition: jp2.c:1145
opj_jp2_comps::sgnd
int sgnd
Definition: jp2.h:113
jp2_write_ftyp
static void jp2_write_ftyp(opj_jp2_t *jp2, opj_cio_t *cio)
Write the FTYP box - File type box.
Definition: jp2.c:844
JP2_COLR
#define JP2_COLR
Colour specification box.
Definition: jp2.h:46
opj_jp2_cmap_comp::cmp
unsigned short cmp
Definition: jp2.h:79
opj_jp2_box
JP2 Box.
Definition: jp2.h:150
jp2_read_jp
static opj_bool jp2_read_jp(opj_jp2_t *jp2, opj_cio_t *cio)
Read the JP box - JPEG 2000 signature.
Definition: jp2.c:971
JP2_CMAP
#define JP2_CMAP
Component Mapping box.
Definition: jp2.h:53
opj_jp2_comps::depth
int depth
Definition: jp2.h:112
jp2_setup_decoder
void jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters)
Setup the decoder decoding parameters using user parameters.
Definition: jp2.c:1105
jp2_read_cdef
static opj_bool jp2_read_cdef(opj_jp2_t *jp2, opj_cio_t *cio, opj_jp2_box_t *box, opj_jp2_color_t *color)
Definition: jp2.c:560
opj_image::y0
int y0
YOsiz: vertical offset from the origin of the reference grid to the top side of the image area.
Definition: openjpeg.h:537
jp2_apply_pclr
static void jp2_apply_pclr(opj_jp2_color_t *color, opj_image_t *image, opj_common_ptr cinfo)
Apply collected palette data.
Definition: jp2.c:360
CLRSPC_GRAY
@ CLRSPC_GRAY
grayscale
Definition: openjpeg.h:134
opj_jp2_color::icc_profile_buf
unsigned char * icc_profile_buf
Definition: jp2.h:100
JPIP_IPTR
#define JPIP_IPTR
Definition: indexbox_manager.h:55
opj_cio::end
unsigned char * end
pointer to the end of the stream
Definition: openjpeg.h:489
opj_jp2_pclr::entries
unsigned int * entries
Definition: jp2.h:88
jp2_read_cmap
static opj_bool jp2_read_cmap(opj_jp2_t *jp2, opj_cio_t *cio, opj_jp2_box_t *box, opj_jp2_color_t *color)
Collect component mapping data.
Definition: jp2.c:492
write_cidx
int write_cidx(int offset, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t cstr_info, int j2klen)
Definition: cidx_manager.c:68
jp2_create_decompress
opj_jp2_t * jp2_create_decompress(opj_common_ptr cinfo)
Creates a JP2 decompression structure.
Definition: jp2.c:1076
opj_jp2_decode
opj_image_t * opj_jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio, opj_codestream_info_t *cstr_info)
Decode an image from a JPEG-2000 file stream.
Definition: jp2.c:744
cio_tell
int OPJ_CALLCONV cio_tell(opj_cio_t *cio)
Get position in byte stream.
Definition: cio.c:100
opj_jp2_cdef_t
struct opj_jp2_cdef opj_jp2_cdef_t
Channel descriptions and number of descriptions.
OPJ_TRUE
#define OPJ_TRUE
Definition: openjpeg.h:64
opj_jp2::C
unsigned int C
Definition: jp2.h:129
JP2_JP2C
#define JP2_JP2C
Contiguous codestream box.
Definition: jp2.h:47
opj_image_comp::data
int * data
image component data
Definition: openjpeg.h:527
opj_jp2_cdef::info
opj_jp2_cdef_info_t * info
Definition: jp2.h:70
JPIP_FIDX
#define JPIP_FIDX
Definition: indexbox_manager.h:52
jp2_read_bpcc
static opj_bool jp2_read_bpcc(opj_jp2_t *jp2, opj_cio_t *cio)
Definition: jp2.c:286
opj_jp2_t
struct opj_jp2 opj_jp2_t
JPEG-2000 file format reader/writer.
jp2_destroy_decompress
void jp2_destroy_decompress(opj_jp2_t *jp2)
Destroy a JP2 decompressor handle.
Definition: jp2.c:1090
jp2_read_boxhdr
static opj_bool jp2_read_boxhdr(opj_common_ptr cinfo, opj_cio_t *cio, opj_jp2_box_t *box)
Read box headers.
Definition: jp2.c:160
opj_event_msg
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
cio_skip
void cio_skip(opj_cio_t *cio, int n)
Skip some bytes.
Definition: cio.c:198
opj_common_struct
Definition: openjpeg.h:430
JPIP_PRXY
#define JPIP_PRXY
Definition: indexbox_manager.h:54
jp2_read_colr
static opj_bool jp2_read_colr(opj_jp2_t *jp2, opj_cio_t *cio, opj_jp2_box_t *box, opj_jp2_color_t *color)
Collect colour specification data.
Definition: jp2.c:593
jp2_read_ihdr
static opj_bool jp2_read_ihdr(opj_jp2_t *jp2, opj_cio_t *cio)
Read the IHDR box - Image Header box.
Definition: jp2.c:211
jp2_destroy_decompress
void jp2_destroy_decompress(opj_jp2_t *jp2)
Destroy a JP2 decompressor handle.
Definition: jp2.c:1090
JP2_CDEF
#define JP2_CDEF
Channel Definition box.
Definition: jp2.h:54
opj_jp2::brand
unsigned int brand
Definition: jp2.h:136
opj_cio::bp
unsigned char * bp
pointer to the current position
Definition: openjpeg.h:491
jp2_apply_cdef
static void jp2_apply_cdef(opj_image_t *image, opj_jp2_color_t *color)
Definition: jp2.c:525
opj_jp2::cl
unsigned int * cl
Definition: jp2.h:139
write_prxy
static void write_prxy(int offset_jp2c, int length_jp2c, int offset_idx, int length_idx, opj_cio_t *cio)
Write proxy box.
Definition: jp2.c:1030
jp2_create_compress
opj_jp2_t * jp2_create_compress(opj_common_ptr cinfo)
Creates a JP2 compression structure.
Definition: jp2.c:1116
opj_jp2::approx
unsigned int approx
Definition: jp2.h:133
JP2_JP
#define JP2_JP
JPEG 2000 signature box.
Definition: jp2.h:42
jp2_read_jp2c
static opj_bool jp2_read_jp2c(opj_jp2_t *jp2, opj_cio_t *cio, unsigned int *j2k_codestream_length, unsigned int *j2k_codestream_offset)
Definition: jp2.c:933
opj_bool
int opj_bool
Definition: openjpeg.h:63
opj_jp2_cdef_info::cn
unsigned short cn
Definition: jp2.h:62
j2k_setup_encoder
void j2k_setup_encoder(opj_j2k_t *j2k, opj_cparameters_t *parameters, opj_image_t *image)
Setup the encoder parameters using the current image and using user parameters.
Definition: j2k.c:2150
opj_jp2_cdef
Channel descriptions and number of descriptions.
Definition: jp2.h:69
opj_jp2_cdef::n
unsigned short n
Definition: jp2.h:71
JP2_PCLR
#define JP2_PCLR
Palette box.
Definition: jp2.h:52
opj_dparameters
Decompression parameters.
Definition: openjpeg.h:363
opj_image_comp::h
int h
data height
Definition: openjpeg.h:511
opj_jp2::numcl
unsigned int numcl
Definition: jp2.h:138
cio_seek
void OPJ_CALLCONV cio_seek(opj_cio_t *cio, int pos)
Set position in byte stream.
Definition: cio.c:109
opj_image::comps
opj_image_comp_t * comps
image components
Definition: openjpeg.h:547
opj_jp2::cinfo
opj_common_ptr cinfo
codec context
Definition: jp2.h:122
write_iptr
static void write_iptr(int offset, int length, opj_cio_t *cio)
Write index Finder box.
Definition: jp2.c:1054
free_color_data
static void free_color_data(opj_jp2_color_t *color)
Definition: jp2.c:346
opj_jp2_cmap_comp
Component mappings: channel index, mapping type, palette index.
Definition: jp2.h:78
opj_codestream_info
Index structure of the codestream.
Definition: openjpeg.h:672
JP2_FTYP
#define JP2_FTYP
File type box.
Definition: jp2.h:43
jp2_read_pclr
static opj_bool jp2_read_pclr(opj_jp2_t *jp2, opj_cio_t *cio, opj_jp2_box_t *box, opj_jp2_color_t *color)
Collect palette data.
Definition: jp2.c:437
jp2_write_bpcc
static void jp2_write_bpcc(opj_jp2_t *jp2, opj_cio_t *cio)
Definition: jp2.c:267
opj_jp2_encode
opj_bool opj_jp2_encode(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info)
Encode an image into a JPEG-2000 file stream.
Definition: jp2.c:1212
EVT_ERROR
#define EVT_ERROR
Error event type.
Definition: event.h:35
opj_jp2::j2k
opj_j2k_t * j2k
handle to the J2K codec
Definition: jp2.h:124
opj_jp2_color_t
struct opj_jp2_color opj_jp2_color_t
Collector for ICC profile, palette, component mapping, channel description.
opj_jp2_color::jp2_cdef
opj_jp2_cdef_t * jp2_cdef
Definition: jp2.h:103
JPIP_CIDX
#define JPIP_CIDX
Definition: indexbox_manager.h:43
jp2_setup_encoder
void jp2_setup_encoder(opj_jp2_t *jp2, opj_cparameters_t *parameters, opj_image_t *image)
Setup the encoder parameters using the current image and using user parameters.
Definition: jp2.c:1145
cio_getbp
unsigned char * cio_getbp(opj_cio_t *cio)
Get pointer to the current position in the stream.
Definition: cio.c:129
opj_jp2_box::length
int length
Definition: jp2.h:151
opj_jp2::comps
opj_jp2_comps_t * comps
Definition: jp2.h:140
opj_jp2_comps::bpcc
int bpcc
Definition: jp2.h:114
opj_jp2_cmap_comp::mtyp
unsigned char mtyp
Definition: jp2.h:80
opj_jp2::h
unsigned int h
Definition: jp2.h:126
OPJ_FALSE
#define OPJ_FALSE
Definition: openjpeg.h:65
opj_jp2_comps
JP2 component.
Definition: jp2.h:111
OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG
#define OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG
Definition: openjpeg.h:358
CLRSPC_SRGB
@ CLRSPC_SRGB
sRGB
Definition: openjpeg.h:133
j2k_decode
opj_image_t * j2k_decode(opj_j2k_t *j2k, opj_cio_t *cio, opj_codestream_info_t *cstr_info)
Decode an image from a JPEG-2000 codestream.
Definition: j2k.c:1912
opj_image::icc_profile_len
int icc_profile_len
size of ICC profile
Definition: openjpeg.h:551
opj_image::y1
int y1
Ysiz: height of the reference grid.
Definition: openjpeg.h:541
jp2_destroy_compress
void jp2_destroy_compress(opj_jp2_t *jp2)
Destroy a JP2 compressor handle.
Definition: jp2.c:1130
opj_jp2_box::init_pos
int init_pos
Definition: jp2.h:153
j2k_encode
opj_bool j2k_encode(opj_j2k_t *j2k, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info)
Encode an image into a JPEG-2000 codestream.
Definition: j2k.c:2408
jp2_create_compress
opj_jp2_t * jp2_create_compress(opj_common_ptr cinfo)
Creates a JP2 compression structure.
Definition: jp2.c:1116
opj_image::icc_profile_buf
unsigned char * icc_profile_buf
'restricted' ICC profile
Definition: openjpeg.h:549
opj_jp2::minversion
unsigned int minversion
Definition: jp2.h:137
opj_image
Defines image data and characteristics.
Definition: openjpeg.h:533
opj_jp2_pclr::nr_channels
unsigned short nr_channels
Definition: jp2.h:92
jp2_read_ftyp
static opj_bool jp2_read_ftyp(opj_jp2_t *jp2, opj_cio_t *cio)
Read the FTYP box - File type box.
Definition: jp2.c:865
j2k_setup_decoder
void j2k_setup_decoder(opj_j2k_t *j2k, opj_dparameters_t *parameters)
Setup the decoder decoding parameters using user parameters.
Definition: j2k.c:1892
opj_jp2_decode
opj_image_t * opj_jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio, opj_codestream_info_t *cstr_info)
Decode an image from a JPEG-2000 file stream.
Definition: jp2.c:744
CLRSPC_UNKNOWN
@ CLRSPC_UNKNOWN
not supported by the library
Definition: openjpeg.h:131
opj_jp2::precedence
unsigned int precedence
Definition: jp2.h:135
JP2_BPCC
#define JP2_BPCC
Bits per component box.
Definition: jp2.h:50
opj_image::numcomps
int numcomps
number of components in the image
Definition: openjpeg.h:543
j2k_destroy_compress
void j2k_destroy_compress(opj_j2k_t *j2k)
Destroy a J2K compressor handle.
Definition: j2k.c:2127
opj_jp2::meth
unsigned int meth
Definition: jp2.h:132
opj_jp2::IPR
unsigned int IPR
Definition: jp2.h:131