emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master bf44581a5e: Don't use native image APIs for some types on Haiku


From: Po Lu
Subject: master bf44581a5e: Don't use native image APIs for some types on Haiku
Date: Mon, 11 Apr 2022 22:38:18 -0400 (EDT)

branch: master
commit bf44581a5e6a8232b222261a607e5bee148c195b
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Don't use native image APIs for some types on Haiku
    
    * src/haikuimage.c (haiku_can_use_native_image_api): Ignore
    types with animations when their respective libraries are
    present.
---
 src/haikuimage.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/haikuimage.c b/src/haikuimage.c
index 1207fb32d3..af3021c5cd 100644
--- a/src/haikuimage.c
+++ b/src/haikuimage.c
@@ -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;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]