}
opj_read_bytes(p_colr_header_data,&jp2->enumcs ,4); /* EnumCS */
+
+ jp2->color.jp2_has_colr = 1;
}
else if (jp2->meth == 2) {
/* ICC profile */
++p_colr_header_data;
jp2->color.icc_profile_buf[it_icc_value] = (OPJ_BYTE) l_value;
}
-
+
+ jp2->color.jp2_has_colr = 1;
}
- else
- opj_event_msg(p_manager, EVT_INFO, "COLR BOX meth value is not a regular value (%d), so we will skip the fields following the approx field.\n", jp2->meth);
-
- jp2->color.jp2_has_colr = 1;
-
- return OPJ_TRUE;
+ else if (jp2->meth > 2)
+ {
+ /* ISO/IEC 15444-1:2004 (E), Table I.9 Legal METH values:
+ conforming JP2 reader shall ignore the entire Colour Specification box.*/
+ opj_event_msg(p_manager, EVT_INFO, "COLR BOX meth value is not a regular value (%d), "
+ "so we will ignore the entire Colour Specification box. \n", jp2->meth);
+ }
+ return OPJ_TRUE;
}
OPJ_BOOL opj_jp2_decode(opj_jp2_t *jp2,