]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't use native image APIs for some types on Haiku
authorPo Lu <luangruo@yahoo.com>
Tue, 12 Apr 2022 02:37:39 +0000 (02:37 +0000)
committerPo Lu <luangruo@yahoo.com>
Tue, 12 Apr 2022 02:37:39 +0000 (02:37 +0000)
* src/haikuimage.c (haiku_can_use_native_image_api): Ignore
types with animations when their respective libraries are
present.

src/haikuimage.c

index 1207fb32d36cbacd57b2f4f7e43474c4f3a2f724..af3021c5cd9cee71b5d5b010f6055fb6a9dd38f7 100644 (file)
@@ -42,8 +42,10 @@ haiku_can_use_native_image_api (Lisp_Object type)
     mime_type = "image/jpeg";
   else if (EQ (type, Qpng))
     mime_type = "image/png";
+#ifndef HAVE_GIF
   else if (EQ (type, Qgif))
     mime_type = "image/gif";
+#endif
   else if (EQ (type, Qtiff))
     mime_type = "image/tiff";
   else if (EQ (type, Qbmp))
@@ -52,8 +54,12 @@ haiku_can_use_native_image_api (Lisp_Object type)
     mime_type = "image/svg";
   else if (EQ (type, Qpbm))
     mime_type = "image/pbm";
+  /* Don't use native image APIs for image types that have animations,
+     since those aren't supported by the Translation Kit.  */
+#ifndef HAVE_WEBP
   else if (EQ (type, Qwebp))
     mime_type = "image/webp";
+#endif
 
   if (!mime_type)
     return 0;