diff --git a/ChangeLog b/ChangeLog index 4ffce3a6..1d7fa42d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 diff --git a/codec/image_to_j2k.c b/codec/image_to_j2k.c index 7e9436e1..89cbc3cc 100644 --- a/codec/image_to_j2k.c +++ b/codec/image_to_j2k.c @@ -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", ¶meters->tcp_rates[parameters->tcp_numlayers]) == 1) { parameters->tcp_numlayers++; while (*s && *s != ',') {