From 9bb4d7a8ba1509ea57a271cddc561e7d621175ec Mon Sep 17 00:00:00 2001 From: cristy Date: Sun, 20 Apr 2014 01:41:32 +0000 Subject: [PATCH] --- coders/webp.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/coders/webp.c b/coders/webp.c index 5b50bbdff..4d1da578d 100644 --- a/coders/webp.c +++ b/coders/webp.c @@ -557,12 +557,16 @@ static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info, value=GetImageOption(image_info,"webp:image-hint"); if (value != (char *) NULL) { - if (LocaleCompare(value,"graph") == 0) - configure.image_hint=WEBP_HINT_GRAPH; + if (LocaleCompare(value,"default") == 0) + configure.image_hint=WEBP_HINT_DEFAULT; if (LocaleCompare(value,"photo") == 0) configure.image_hint=WEBP_HINT_PHOTO; if (LocaleCompare(value,"picture") == 0) configure.image_hint=WEBP_HINT_PICTURE; +#if WEBP_ENCODER_ABI_VERSION >= 0x0200 + if (LocaleCompare(value,"graph") == 0) + configure.image_hint=WEBP_HINT_GRAPH; +#endif } value=GetImageOption(image_info,"webp:target-size"); if (value != (char *) NULL) @@ -613,6 +617,19 @@ static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info, value=GetImageOption(image_info,"webp:partition-limit"); if (value != (char *) NULL) configure.partition_limit=StringToInteger(value); +#if WEBP_ENCODER_ABI_VERSION >= 0x0201 + value=GetImageOption(image_info,"webp:low-memory"); + if (value != (char *) NULL) + configure.low_memory=(int) ParseCommandOption(MagickBooleanOptions, + MagickFalse,value); + value=GetImageOption(image_info,"webp:partition-limit"); + if (value != (char *) NULL) + configure.emulate_jpeg_size=(int) ParseCommandOption(MagickBooleanOptions, + MagickFalse,value); + value=GetImageOption(image_info,"webp:thread-level"); + if (value != (char *) NULL) + configure.thread_level=StringToInteger(value); +#endif if (WebPValidateConfig(&configure) == 0) ThrowWriterException(ResourceLimitError,"UnableToEncodeImageFile"); /* -- 2.40.0