You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the simplest solution (patch attached):
bin/opj_decompress -i Bretagne2.j2k -o Bretagne2.j2k.png -r 8
[INFO] Start to read j2k main header (0).
[ERROR] Error decoding component 0.
The number of resolutions 8 to remove is >= the maximum of resolutions 6 of this component
=== Reduce to 5 ===
[ERROR] Error reading COD marker
[ERROR] Marker handler function failed to read the marker segment
ERROR -> opj_decompress: failed to read the header
winfried
--- openjpeg/src/lib/openjp2/j2k.c.orig 2015-08-23 20:11:21.541979066 +0000
+++ openjpeg/src/lib/openjp2/j2k.c 2015-08-26 02:59:35.369928188 +0000
@@ -8751,8 +8751,8 @@
/* If user wants to remove more resolutions than the codestream contains, return error */
if (l_cp->m_specific_param.m_dec.m_reduce >= l_tccp->numresolutions) {
- opj_event_msg(p_manager, EVT_ERROR, "Error decoding component %d.\nThe number of resolutions to remove is higher than the number "
- "of resolutions of this component\nModify the cp_reduce parameter.\n\n", compno);
+ opj_event_msg(p_manager, EVT_ERROR, "Error decoding component %d.\n == The number of resolutions to remove %d is > the possible number %d ==\n",
+ compno,l_cp->m_specific_param.m_dec.m_reduce,(l_tccp->numresolutions - 1));
p_j2k->m_specific_param.m_decoder.m_state |= 0x8000;/* FIXME J2K_DEC_STATE_ERR;*/
return OPJ_FALSE;
}
Originally reported on Google Code with ID 474
Reported by szukw000 on 2015-02-14 06:12:08
- _Attachment: [reduce_factor_may_fail.dif](https://storage.googleapis.com/google-code-attachments/openjpeg/issue-474/comment-0/reduce_factor_may_fail.dif)_
The text was updated successfully, but these errors were encountered: