From: よや Date: Sun, 10 Feb 2019 13:42:15 +0000 (+0900) Subject: change from WEBP_DECODER_ABI_VERSION to WEBP_ENCODER_ABI_VERSION (#1476) X-Git-Tag: 7.0.8-28~20 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5ce163fffe13d3307a1bf7cb43047c6382f3de8a;p=imagemagick change from WEBP_DECODER_ABI_VERSION to WEBP_ENCODER_ABI_VERSION (#1476) because we need encoder feature switch. --- diff --git a/coders/webp.c b/coders/webp.c index bbc51be12..cf2e5549b 100644 --- a/coders/webp.c +++ b/coders/webp.c @@ -481,9 +481,9 @@ ModuleExport size_t RegisterWEBPImage(void) entry->decoder=(DecodeImageHandler *) ReadWEBPImage; entry->encoder=(EncodeImageHandler *) WriteWEBPImage; (void) FormatLocaleString(version,MagickPathExtent,"libwebp %d.%d.%d [%04X]", - (WebPGetDecoderVersion() >> 16) & 0xff, - (WebPGetDecoderVersion() >> 8) & 0xff, - (WebPGetDecoderVersion() >> 0) & 0xff,WEBP_DECODER_ABI_VERSION); + (WebPGetEncoderVersion() >> 16) & 0xff, + (WebPGetEncoderVersion() >> 8) & 0xff, + (WebPGetEncoderVersion() >> 0) & 0xff,WEBP_ENCODER_ABI_VERSION); #endif entry->mime_type=ConstantString("image/webp"); entry->flags|=CoderDecoderSeekableStreamFlag; @@ -546,7 +546,7 @@ ModuleExport void UnregisterWEBPImage(void) % */ -#if WEBP_DECODER_ABI_VERSION >= 0x0100 +#if WEBP_ENCODER_ABI_VERSION >= 0x0100 static int WebPEncodeProgress(int percent,const WebPPicture* picture) { #define EncodeImageTag "Encode/Image" @@ -634,7 +634,7 @@ static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info, picture.writer=WebPMemoryWrite; picture.custom_ptr=(&writer_info); #endif -#if WEBP_DECODER_ABI_VERSION >= 0x0100 +#if WEBP_ENCODER_ABI_VERSION >= 0x0100 picture.progress_hook=WebPEncodeProgress; picture.user_data=(void *) image; #endif @@ -663,7 +663,7 @@ static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info, configure.image_hint=WEBP_HINT_PHOTO; if (LocaleCompare(value,"picture") == 0) configure.image_hint=WEBP_HINT_PICTURE; -#if WEBP_DECODER_ABI_VERSION >= 0x0200 +#if WEBP_ENCODER_ABI_VERSION >= 0x0200 if (LocaleCompare(value,"graph") == 0) configure.image_hint=WEBP_HINT_GRAPH; #endif @@ -717,7 +717,7 @@ 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_DECODER_ABI_VERSION >= 0x0201 +#if WEBP_ENCODER_ABI_VERSION >= 0x0201 value=GetImageOption(image_info,"webp:emulate-jpeg-size"); if (value != (char *) NULL) configure.emulate_jpeg_size=(int) ParseCommandOption(MagickBooleanOptions, @@ -730,7 +730,7 @@ static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info, if (value != (char *) NULL) configure.thread_level=StringToInteger(value); #endif -#if WEBP_DECODER_ABI_VERSION >= 0x020e +#if WEBP_ENCODER_ABI_VERSION >= 0x020e value=GetImageOption(image_info,"webp:use-sharp-yuv"); if (value != (char *) NULL) configure.use_sharp_yuv=StringToInteger(value); @@ -828,7 +828,7 @@ static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info, message="file too big (> 4GB)"; break; } -#if WEBP_DECODER_ABI_VERSION >= 0x0100 +#if WEBP_ENCODER_ABI_VERSION >= 0x0100 case VP8_ENC_ERROR_USER_ABORT: { message="user abort";