]> granicus.if.org Git - imagemagick/commitdiff
change from WEBP_DECODER_ABI_VERSION to WEBP_ENCODER_ABI_VERSION (#1476)
authorよや <yoya@awm.jp>
Sun, 10 Feb 2019 13:42:15 +0000 (22:42 +0900)
committerImageMagick <urban-warrior@users.noreply.github.com>
Sun, 10 Feb 2019 13:42:15 +0000 (08:42 -0500)
because we need encoder feature switch.

coders/webp.c

index bbc51be122cb0b73b4bb015bfe2d907200aefc4e..cf2e5549b21e06abaf7ba997d3bca41a58e398af 100644 (file)
@@ -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";