[trunk] WIP: fix get_decoded_tile function to avoid error with output image

This commit is contained in:
Mickael Savinaud 2011-11-09 16:15:15 +00:00
parent eb3cd22aa3
commit c4c01b61e6
3 changed files with 11 additions and 1 deletions

View File

@ -6,6 +6,7 @@ What's New for OpenJPEG
+ : added
November 9, 2011
* [mickael] WIP: fix get_decoded_tile function to avoid error with output image
* [mickael] fix bug with mj2 applications (credit to winfried)
+ [mickael] enhance mj2 when read jp2h (credit to winfried)
+ [mickael] check if the file extension is the same as the infile format (credit to winfried)

View File

@ -8376,9 +8376,18 @@ opj_bool j2k_get_tile( opj_j2k_v2_t *p_j2k,
l_tile_y = tile_index / p_j2k->m_cp.tw;
p_image->x0 = l_tile_x * p_j2k->m_cp.tdx + p_j2k->m_cp.tx0;
if (p_image->x0 < p_j2k->m_private_image->x0)
p_image->x0 = p_j2k->m_private_image->x0;
p_image->x1 = (l_tile_x + 1) * p_j2k->m_cp.tdx + p_j2k->m_cp.tx0;
if (p_image->x1 > p_j2k->m_private_image->x1)
p_image->x1 = p_j2k->m_private_image->x1;
p_image->y0 = l_tile_y * p_j2k->m_cp.tdy + p_j2k->m_cp.ty0;
if (p_image->y0 < p_j2k->m_private_image->y0)
p_image->y0 = p_j2k->m_private_image->y0;
p_image->y1 = (l_tile_y + 1) * p_j2k->m_cp.tdy + p_j2k->m_cp.ty0;
if (p_image->y1 > p_j2k->m_private_image->y1)
p_image->y1 = p_j2k->m_private_image->y1;
l_img_comp = p_image->comps;
for (compno=0; compno < p_image->numcomps; ++compno)

View File

@ -96,7 +96,7 @@ IF (TEST_SUITE_FILES)
# Avoid to process the official test suite
SET(FILE_ALREADY_READ 0)
STRING(REGEX MATCH "test_suite.ctest.in$" FILE_ALREADY_READ ${TEST_SUITE_FILE})
STRING(REGEX MATCH "^test_suite.ctest.in$" FILE_ALREADY_READ ${TEST_SUITE_FILE})
IF(NOT FILE_ALREADY_READ)
# Configure the additional test suite file: