test_decode_area: fix to make it work with odd image dimensions
This commit is contained in:
parent
5d12806091
commit
028c504a43
|
@ -367,6 +367,7 @@ int main(int argc, char** argv)
|
|||
da_y0 = (OPJ_INT32)opj_uint_min(l_image->y1, (OPJ_UINT32)da_y0 + 1);
|
||||
da_y1 = (OPJ_INT32)opj_uint_min(l_image->y1, (OPJ_UINT32)da_y1 + 1);
|
||||
}
|
||||
if (da_x0 < (OPJ_INT32)l_image->x1 && da_y0 < (OPJ_INT32)l_image->y1) {
|
||||
l_sub_image = decode(quiet, input_file, da_x0, da_y0, da_x1, da_y1,
|
||||
NULL, NULL, NULL, NULL);
|
||||
if (!l_sub_image) {
|
||||
|
@ -388,6 +389,7 @@ int main(int argc, char** argv)
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
opj_image_destroy(l_image);
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue