Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/6845
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Nov 3, 2023
1 parent 8ad5a7a commit 8f26983
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions coders/webp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1148,10 +1148,13 @@ static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info,
if (WebPConfigInit(&configure) == 0)
ThrowWriterException(ResourceLimitError,"UnableToEncodeImageFile");
if (image->quality != UndefinedCompressionQuality)
{
configure.quality=(float) image->quality;
#if WEBP_ENCODER_ABI_VERSION >= 0x020e
configure.near_lossless=(float) image->quality;
#endif
if (image->quality >= 100)
}
if (image->quality >= 100)
configure.lossless=1;
SetBooleanOption(image_info,"webp:lossless",&configure.lossless);
value=GetImageOption(image_info,"webp:image-hint");
Expand All @@ -1176,8 +1179,7 @@ static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info,
&configure.alpha_compression);
SetIntegerOption(image_info,"webp:alpha-filtering",
&configure.alpha_filtering);
SetIntegerOption(image_info,"webp:alpha-quality",
&configure.alpha_quality);
SetIntegerOption(image_info,"webp:alpha-quality",&configure.alpha_quality);
SetIntegerOption(image_info,"webp:filter-strength",
&configure.filter_strength);
SetIntegerOption(image_info,"webp:filter-sharpness",
Expand Down

0 comments on commit 8f26983

Please sign in to comment.