Makes j2k_dump focus on parsing j2k codestreams, nothing else.
Avoid processing JP2 PCLR, CMAP, CDEF boxes and J2K packets in j2k_dump. Fixes #595
This commit is contained in:
parent
5e3fae7f48
commit
32b04ad49d
@ -359,6 +359,11 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* j2k_dump focuses on j2k codestream and skips JP2 boxes */
|
||||
parameters.flags = 1;
|
||||
/* j2k_dump shall not actually decode packets (parsing codestream is enough). */
|
||||
parameters.cp_limit_decoding = DECODE_ALL_BUT_PACKETS;
|
||||
|
||||
/* Initialize reading of directory */
|
||||
if(img_fol.set_imgdir==1){
|
||||
num_images=get_num_images(img_fol.imgdirpath);
|
||||
|
@ -1726,6 +1726,8 @@ static void j2k_read_eoc(opj_j2k_t *j2k) {
|
||||
}
|
||||
/* if packets should not be decoded */
|
||||
else {
|
||||
opj_event_msg(j2k->cinfo, EVT_INFO, "Codestream parsing complete.\n");
|
||||
opj_event_msg(j2k->cinfo, EVT_INFO, "Skipped actual packet decoding.\n");
|
||||
for (i = 0; i < j2k->cp->tileno_size; i++) {
|
||||
tileno = j2k->cp->tileno[i];
|
||||
opj_free(j2k->tile_data[tileno]);
|
||||
|
Loading…
Reference in New Issue
Block a user