From e8f97ad2b5bb61f64aab3156767fe71aeb0ba2f7 Mon Sep 17 00:00:00 2001 From: Jeremy Collins Date: Fri, 20 Jul 2018 13:25:58 -0400 Subject: [PATCH] Fix issue that caused quality settings to be ignored When converting to JPG from another format the quality setting in the wand is always 0 causing this command to be ignored. --- src/mod_dims_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mod_dims_ops.c b/src/mod_dims_ops.c index 2589702..e4f7c04 100644 --- a/src/mod_dims_ops.c +++ b/src/mod_dims_ops.c @@ -228,7 +228,7 @@ dims_quality_operation (dims_request_rec *d, char *args, char **err) { int quality = apr_strtoi64(args, NULL, 0); int existing_quality = MagickGetImageCompressionQuality(d->wand); - if(quality < existing_quality) { + if(quality < existing_quality || existing_quality == 0) { MAGICK_CHECK(MagickSetImageCompressionQuality(d->wand, quality), d); } return DIMS_SUCCESS;