Skip to content

Commit

Permalink
Fix issue that caused quality settings to be ignored
Browse files Browse the repository at this point in the history
When converting to JPG from another format the quality setting in the wand is always 0 causing this command to be ignored.
  • Loading branch information
Jeremy Collins committed Jul 20, 2018
1 parent 45cd6ca commit e8f97ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mod_dims_ops.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e8f97ad

Please sign in to comment.