From 4a90f97639748de0164054a110171a2b4111eb13 Mon Sep 17 00:00:00 2001 From: Antonin Descampe Date: Thu, 21 Aug 2008 16:00:44 +0000 Subject: [PATCH] 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). --- ChangeLog | 3 +++ codec/image_to_j2k.c | 1 + 2 files changed, 4 insertions(+) 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 != ',') {