fixed a bug in image_to_j2k.c that was preventing the 'r' option to work properly (everything was compressed lossless regardless of the specified rate).

This commit is contained in:
Antonin Descampe 2008-08-21 16:00:44 +00:00
parent 4da178b0d8
commit 4a90f97639
2 changed files with 4 additions and 0 deletions

View File

@ -5,6 +5,9 @@ What's New for OpenJPEG
! : changed
+ : added
August 21, 2008
* [antonin] fixed a bug in image_to_j2k.c that was preventing the 'r' option to work properly (everything was compressed lossless regardless of the specified rate).
August 8, 2008
! [FOD] Modified the way raw images with more that 8bpp are read and written

View File

@ -670,6 +670,7 @@ int parse_cmdline_encoder(int argc, char **argv, opj_cparameters_t *parameters,
case 'r': /* rates rates/distorsion */
{
char *s = optarg;
parameters->tcp_numlayers = 0;
while (sscanf(s, "%f", &parameters->tcp_rates[parameters->tcp_numlayers]) == 1) {
parameters->tcp_numlayers++;
while (*s && *s != ',') {