[1.5] The two files in Issue145 have a precision < 8-bit:

therefore 'jp2_read_pclr' must be changed.

j2k_to_image fails to create RGB/RGBA images with a
precision < 8-bit: therefore 'imagetopng' must be
changed.
Update issue 145
This commit is contained in:
Mathieu Malaterre
2012-05-29 13:54:21 +00:00
parent 8a279881d4
commit 835bf5357f
2 changed files with 64 additions and 28 deletions

View File

@@ -469,7 +469,7 @@ static opj_bool jp2_read_pclr(opj_jp2_t *jp2, opj_cio_t *cio,
for(i = 0; i < nr_channels; ++i)
{
/* Cji */
*entries++ = cio_read(cio, channel_size[i]>>3);
*entries++ = cio_read(cio, (channel_size[i]+7)>>3);
}
}