Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/openjpeg/doc/man/man3/libopenjp2.3 @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 1 '\" t | |
| 2 '\" The line above instructs most `man' programs to invoke tbl | |
| 3 '\" | |
| 4 '\" Separate paragraphs; not the same as PP which resets indent level. | |
| 5 .de SP | |
| 6 .if t .sp .5 | |
| 7 .if n .sp | |
| 8 .. | |
| 9 '\" | |
| 10 '\" Replacement em-dash for nroff (default is too short). | |
| 11 .ie n .ds m " - | |
| 12 .el .ds m \(em | |
| 13 '\" | |
| 14 '\" Placeholder macro for if longer nroff arrow is needed. | |
| 15 .ds RA \(-> | |
| 16 '\" | |
| 17 '\" Decimal point set slightly raised | |
| 18 .if t .ds d \v'-.15m'.\v'+.15m' | |
| 19 .if n .ds d . | |
| 20 '\" | |
| 21 '\" Enclosure macro for examples | |
| 22 .de EX | |
| 23 .SP | |
| 24 .nf | |
| 25 .ft CW | |
| 26 .. | |
| 27 .de EE | |
| 28 .ft R | |
| 29 .SP | |
| 30 .fi | |
| 31 .. | |
| 32 .TH libopenjp2 3 "Oct 2010" "Version 1.4.0" "Oct 2010" | |
| 33 .P | |
| 34 .SH NAME | |
| 35 libopenjp2 - | |
| 36 a library for reading and writing JPEG2000 image files. | |
| 37 .SP | |
| 38 .SH SYNOPSIS | |
| 39 .P | |
| 40 .B #include <openjpeg.h> | |
| 41 .P | |
| 42 .SS CONVERSION FORMATS | |
| 43 .B PGX: imagetopgx() \fR/\fB pgxtoimage() | |
| 44 .P | |
| 45 .B PXM: imagetopnm() \fR/\fB pnmtoimage() | |
| 46 .P | |
| 47 .B BMP: imagetobmp() \fR/\fB bmptoimage() | |
| 48 .P | |
| 49 .B TIF: imagetotif() \fR/\fB tiftoimage() | |
| 50 .P | |
| 51 .B RAW: imagetoraw() \fR/\fB rawtoimage() | |
| 52 .P | |
| 53 .B TGA: imagetotga() \fR/\fB tgatoimage() | |
| 54 .P | |
| 55 .B PNG: imagetopng() \fR/\fB pngtoimage() | |
| 56 .P | |
| 57 .B YUV: imagetoyuv() \fR/\fB yuvtoimage() \fR(MJ2) | |
| 58 .P | |
| 59 .SS READ | |
| 60 .B opj_set_default_decoder_parameters(opj_dparameters_t *\fIparams\fB); | |
| 61 .P | |
| 62 .B opj_dinfo_t *opj_create_decompress(OPJ_CODEC_FORMAT \fIformat\fB); | |
| 63 .P | |
| 64 .B opj_event_mgr_t *opj_set_event_mgr(opj_common_ptr \fIinfo\fB, opj_event_mgr_t *\fIevent_mgr\fB, void *\fIcontext\fB); | |
| 65 .P | |
| 66 .B void opj_setup_decoder(opj_dinfo_t *\fIdinfo\fB, opj_dparameters_t * \fIparams\fB); | |
| 67 .P | |
| 68 .B opj_cio_t *opj_cio_open(opj_common_ptr \fIinfo\fB, unsigned char *\fIbuf\fB, int \fIbuf_len\fB); | |
| 69 .P | |
| 70 .B opj_image_t *opj_decode(opj_dinfo_t *\fIdinfo\fB, opj_cio_t *\fIcio\fB); | |
| 71 .P | |
| 72 .B void opj_cio_close(opj_cio_t *\fIcio\fB); | |
| 73 .P | |
| 74 .B void opj_destroy_decompress(opj_dinfo_t *\fIdinfo\fB); | |
| 75 .P | |
| 76 .B void opj_image_destroy(opj_image_t *\fIimage\fB); | |
| 77 .P | |
| 78 .SS WRITE | |
| 79 .B void opj_set_default_encoder_parameters(opj_cparameters_t *\fIparams\fB); | |
| 80 .P | |
| 81 /* | |
| 82 .B opj_image_t *FORMATtoimage(const char *\fIfname\fB, opj_cparameters_t *\fIparams\fB); | |
| 83 .P | |
| 84 */ | |
| 85 .br | |
| 86 .B opj_cinfo_t* opj_create_compress(OPJ_CODEC_FORMAT \fIformat\fB); | |
| 87 .P | |
| 88 .B opj_event_mgr_t *opj_set_event_mgr(opj_common_ptr \fIinfo\fB, opj_event_mgr_t *\fIevent_mgr\fB, void *\fIcontext\fB); | |
| 89 .P | |
| 90 .B void opj_setup_encoder(opj_cinfo_t *\fIcinfo\fB, opj_cparameters_t *\fIparams\fB, opj_image_t *\fIimage\fB); | |
| 91 .P | |
| 92 .B opj_cio_t *opj_cio_open(opj_common_ptr \fIcinfo\fB, \fINULL\fB, \fI0\fB); | |
| 93 .P | |
| 94 .B bool opj_encode(opj_cinfo_t *\fIcinfo\fB, opj_cio_t *\fIcio\fB, opj_image_t *\fIimage\fB, char *\fIindex\fB); | |
| 95 .P | |
| 96 .B void opj_cio_close(opj_cio_t *\fIcio\fB); | |
| 97 .P | |
| 98 .B void opj_destroy_compress(opj_cinfo_t *\fIcinfo\fB); | |
| 99 .P | |
| 100 .B void opj_image_destroy(opj_image_t *\fIimage\fB); | |
| 101 .P | |
| 102 .SS GENERAL | |
| 103 .P | |
| 104 .B void opj_image_create(int \fInumcmpts\fB, opj_image_cmptparm_t *\fIcmptparms\fB, OPJ_COLOR_SPACE \fIclrspc\fB); | |
| 105 .P | |
| 106 .B int cio_tell(opj_cio_t *\fIcio\fB); | |
| 107 .P | |
| 108 .B void cio_seek(opj_cio_t *\fIcio\fB, int \fIpos\fB); | |
| 109 .P | |
| 110 .B opj_image_t *opj_decode_with_info(opj_dinfo_t *\fIdinfo\fB, opj_cio_t *\fIcio\fB, opj_codestream_info_t *\fIcstr_info\fB); | |
| 111 .P | |
| 112 .B bool opj_encode_with_info(opj_cinfo_t *\fIcinfo\fB, opj_cio_t *\fIcio\fB, opj_image_t *\fIimage\fB, opj_codestream_info_t *\fIcstr_info\fB); | |
| 113 .P | |
| 114 .B void opj_destroy_cstr_info(opj_codestream_info_t *\fIcstr_info\fB); | |
| 115 .P | |
| 116 .B const char *opj_version(\fIvoid\fB); | |
| 117 .P | |
| 118 .SH OPJ_CODEC_FORMAT | |
| 119 .P | |
| 120 .B CODEC_J2K\fR or \fBCODEC_JPT\fR or \fBCODEC_JP2 | |
| 121 .P | |
| 122 .SH OPJ_COLOR_SPACE | |
| 123 .P | |
| 124 .B CLRSPC_UNKNOWN\fR or \fBCLRSPC_UNSPECIFIED\fR or \fBCLRSPC_SRGB\fR or \fBCLRSPC_GRAY\fR or \fBCLRSPC_SYCC | |
| 125 .P | |
| 126 .SH DECOMPRESSION PARAMETERS | |
| 127 .p | |
| 128 typedef struct opj_dparameters | |
| 129 .br | |
| 130 { | |
| 131 /* | |
| 132 Set the number of highest resolution levels to be discarded. | |
| 133 The image resolution is effectively divided by 2 to the power | |
| 134 of the number of discarded levels. | |
| 135 The reduce factor is limited by the smallest total number of | |
| 136 decomposition levels among tiles. | |
| 137 if != 0, then original dimension divided by 2^(reduce); | |
| 138 if == 0 or not used, image is decoded to the full resolution | |
| 139 */ | |
| 140 \fBint\fR cp_reduce; | |
| 141 /* | |
| 142 Set the maximum number of quality layers to decode. | |
| 143 If there are less quality layers than the specified number, | |
| 144 all the quality layers are decoded. | |
| 145 if != 0, then only the first "layer" layers are decoded; | |
| 146 if == 0 or not used, all the quality layers are decoded | |
| 147 */ | |
| 148 \fBint\fR cp_layer; | |
| 149 | |
| 150 /*command line encoder parameters (not used inside the library) */ | |
| 151 /* input file name */ | |
| 152 \fBchar\fR infile[OPJ_PATH_LEN]; | |
| 153 /* output file name */ | |
| 154 \fBchar\fR outfile[OPJ_PATH_LEN]; | |
| 155 /* input file format: see OPJ_CODEC_FORMAT */ | |
| 156 \fBint\fR decod_format; | |
| 157 /* output file format */ | |
| 158 \fBint\fR cod_format; | |
| 159 | |
| 160 /*JPWL decoding parameters */ | |
| 161 /* activates the JPWL correction capabilities */ | |
| 162 \fBbool\fR jpwl_correct; | |
| 163 /* expected number of components */ | |
| 164 \fBint\fR jpwl_exp_comps; | |
| 165 /* maximum number of tiles */ | |
| 166 \fBint\fR jpwl_max_tiles; | |
| 167 | |
| 168 /* | |
| 169 Specify whether the decoding should be done on the entire | |
| 170 codestream, or be limited to the main header | |
| 171 Limiting the decoding to the main header makes it possible | |
| 172 to extract the characteristics of the codestream | |
| 173 if == NO_LIMITATION, the entire codestream is decoded; | |
| 174 if == LIMIT_TO_MAIN_HEADER, only the main header is decoded; | |
| 175 */ | |
| 176 \fBOPJ_LIMIT_DECODING\fR cp_limit_decoding; | |
| 177 .br | |
| 178 } opj_dparameters_t; | |
| 179 | |
| 180 .SH COMPRESSION PARAMETERS | |
| 181 .P | |
| 182 typedef struct opj_cparameters | |
| 183 .br | |
| 184 { | |
| 185 /* size of tile: tile_size_on = false (not in argument) | |
| 186 or tile_size_on = true (in argument) */ | |
| 187 \fBbool\fR tile_size_on; | |
| 188 /* XTOsiz */ | |
| 189 \fBint\fR cp_tx0; | |
| 190 /* YTOsiz */ | |
| 191 \fBint\fR cp_ty0; | |
| 192 /* XTsiz */ | |
| 193 \fBint\fR cp_tdx; | |
| 194 /* YTsiz */ | |
| 195 \fBint\fR cp_tdy; | |
| 196 /* allocation by rate/distortion */ | |
| 197 \fBint\fR cp_disto_alloc; | |
| 198 /* allocation by fixed layer */ | |
| 199 \fBint\fR cp_fixed_alloc; | |
| 200 /* add fixed_quality */ | |
| 201 \fBint\fR cp_fixed_quality; | |
| 202 /* fixed layer */ | |
| 203 \fBint *\fRcp_matrice; | |
| 204 /* comment for coding */ | |
| 205 \fBchar *\fRcp_comment; | |
| 206 /* coding style */ | |
| 207 \fBint\fR csty; | |
| 208 /* progression order: | |
| 209 PROG_UNKNOWN, LRCP(default), RLCP, RPCL, PCRL, CPRL */ | |
| 210 \fBOPJ_PROG_ORDER\fR prog_order; | |
| 211 /* progression order changes */ | |
| 212 \fBopj_poc_t\fR POC[32]; | |
| 213 /* number of progression order changes (POC), default: 0 */ | |
| 214 \fBint\fR numpocs; | |
| 215 /* number of layers */ | |
| 216 \fBint\fR tcp_numlayers; | |
| 217 /* rates of layers */ | |
| 218 \fBfloat\fR tcp_rates[100]; | |
| 219 /* different psnr for successive layers */ | |
| 220 \fBfloat\fR tcp_distoratio[100]; | |
| 221 /* number of resolutions */ | |
| 222 \fBint\fR numresolution; | |
| 223 /* initial code block width, default: 64 */ | |
| 224 \fBint\fR cblockw_init; | |
| 225 /* initial code block height, default: 64 */ | |
| 226 \fBint\fR cblockh_init; | |
| 227 /* mode switch (cblk_style) */ | |
| 228 /* 1 : use the irreversible DWT 9-7, | |
| 229 0 : use lossless compression (default) */ | |
| 230 \fBint\fR irreversible; | |
| 231 /* region of interest: affected component in [0..3], | |
| 232 -1 means no ROI */ | |
| 233 \fBint\fR roi_compno; | |
| 234 /* region of interest: upshift value */ | |
| 235 \fBint\fR roi_shift; | |
| 236 /* number of precinct size specifications */ | |
| 237 \fBint\fR res_spec; | |
| 238 /* initial precinct width */ | |
| 239 \fBint\fR prcw_init[J2K_MAXRLVLS]; | |
| 240 /* initial precinct height */ | |
| 241 \fBint\fR prch_init[J2K_MAXRLVLS]; | |
| 242 | |
| 243 /*command line encoder parameters (not used inside the library) */ | |
| 244 /* input file name */ | |
| 245 \fBchar\fR infile[OPJ_PATH_LEN]; | |
| 246 /* output file name */ | |
| 247 \fBchar\fR outfile[OPJ_PATH_LEN]; | |
| 248 /* DEPRECATED. Index generation is now handled with the | |
| 249 opj_encode_with_info() function. Set to NULL */ | |
| 250 \fBint\fR index_on; | |
| 251 /* DEPRECATED. Index generation is now handled with the | |
| 252 opj_encode_with_info() function. Set to NULL */ | |
| 253 \fBchar\fR index[OPJ_PATH_LEN]; | |
| 254 /* subimage encoding: origin image offset in x direction */ | |
| 255 \fBint\fR image_offset_x0; | |
| 256 /* subimage encoding: origin image offset in y direction */ | |
| 257 \fBint\fR image_offset_y0; | |
| 258 /* subsampling value for dx */ | |
| 259 \fBint\fR subsampling_dx; | |
| 260 /* subsampling value for dy */ | |
| 261 \fBint\fR subsampling_dy; | |
| 262 /* input file format */ | |
| 263 \fBint\fR decod_format; | |
| 264 /* output file format: see OPJ_CODEC_FORMAT */ | |
| 265 \fBint\fR cod_format; | |
| 266 | |
| 267 /*JPWL encoding parameters */ | |
| 268 /* enables writing of EPC in MH, thus activating JPWL */ | |
| 269 \fBbool\fR jpwl_epc_on; | |
| 270 /* error protection method for MH (0,1,16,32,37-128) */ | |
| 271 \fBint\fR jpwl_hprot_MH; | |
| 272 /* tile number of header protection specification (>=0) */ | |
| 273 \fBint\fR jpwl_hprot_TPH_tileno[JPWL_MAX_NO_TILESPECS]; | |
| 274 /* error protection methods for TPHs (0,1,16,32,37-128) */ | |
| 275 \fBint\fR jpwl_hprot_TPH[JPWL_MAX_NO_TILESPECS]; | |
| 276 /* tile number of packet protection specification (>=0) */ | |
| 277 \fBint\fR jpwl_pprot_tileno[JPWL_MAX_NO_PACKSPECS]; | |
| 278 /* packet number of packet protection specification (>=0) */ | |
| 279 \fBint\fR jpwl_pprot_packno[JPWL_MAX_NO_PACKSPECS]; | |
| 280 /* error protection methods for packets (0,1,16,32,37-128) */ | |
| 281 \fBint\fR jpwl_pprot[JPWL_MAX_NO_PACKSPECS]; | |
| 282 /* enables writing of ESD, (0=no/1/2 bytes) */ | |
| 283 \fBint\fR jpwl_sens_size; | |
| 284 /* sensitivity addressing size (0=auto/2/4 bytes) */ | |
| 285 \fBint\fR jpwl_sens_addr; | |
| 286 /* sensitivity range (0-3) */ | |
| 287 \fBint\fR jpwl_sens_range; | |
| 288 /* sensitivity method for MH (-1=no,0-7) */ | |
| 289 \fBint\fR jpwl_sens_MH; | |
| 290 /* tile number of sensitivity specification (>=0) */ | |
| 291 \fBint\fR jpwl_sens_TPH_tileno[JPWL_MAX_NO_TILESPECS]; | |
| 292 /* sensitivity methods for TPHs (-1=no,0-7) */ | |
| 293 \fBint\fR jpwl_sens_TPH[JPWL_MAX_NO_TILESPECS]; | |
| 294 | |
| 295 /* Digital Cinema compliance: OFF-not compliant, | |
| 296 CINEMA2K_24, CINEMA2K_48, CINEMA4K_24 */ | |
| 297 \fBOPJ_CINEMA_MODE\fR cp_cinema; | |
| 298 /* Maximum rate for each component. | |
| 299 If == 0, component size limitation is not considered */ | |
| 300 \fBint\fR max_comp_size; | |
| 301 /* Profile name*/ | |
| 302 \fBOPJ_RSIZ_CAPABILITIES\fR cp_rsiz; | |
| 303 /* Tile part generation*/ | |
| 304 \fBchar\fR tp_on; | |
| 305 /* Flag for Tile part generation*/ | |
| 306 \fBchar\fR tp_flag; | |
| 307 /* MCT (multiple component transform) */ | |
| 308 \fBchar\fR tcp_mct; | |
| 309 .br | |
| 310 } opj_cparameters_t; | |
| 311 | |
| 312 | |
| 313 '\".SH OPTIONS | |
| 314 '\".SH BUGS | |
| 315 .SH AUTHORS | |
| 316 Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium | |
| 317 | |
| 318 Copyright (c) 2002-2014, Professor Benoit Macq | |
| 319 | |
| 320 Copyright (c) 2001-2003, David Janssens | |
| 321 | |
| 322 Copyright (c) 2002-2003, Yannick Verschueren | |
| 323 | |
| 324 Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe | |
| 325 | |
| 326 Copyright (c) 2005, Herve Drolon, FreeImage Team | |
| 327 | |
| 328 Copyright (c) 2006-2007, Parvatha Elangovan | |
| 329 | |
| 330 .P | |
| 331 .SH "SEE ALSO" | |
| 332 \fBimage_to_j2k\fR(1) \fBj2k_to_image\fR(1) \fBj2k_dump\fR(1) | |
| 333 | |
| 334 \fBJPWL_image_to_j2k\fR(1) \fBJPWL_j2k_to_image\fR(1) | |
| 335 | |
| 336 \fBextract_j2k_from_mj2\fR(1) \fBwrap_j2k_in_mj2\fR(1) | |
| 337 \fBframes_to_mj2\fR(1) \fBmj2_to_frames\fR(1) |
