summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-04-12 02:37:39 +0000
committerPo Lu <luangruo@yahoo.com>2022-04-12 02:37:39 +0000
commitbf44581a5e6a8232b222261a607e5bee148c195b (patch)
treeb709cdf1ac1db296444930a94a0ba9177f3d2501
parent1ef57361ab784fb15fbc6a8e14600de395fe6b75 (diff)
downloademacs-bf44581a5e6a8232b222261a607e5bee148c195b.tar.gz
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.
-rw-r--r--src/haikuimage.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/haikuimage.c b/src/haikuimage.c
index 1207fb32d36..af3021c5cd9 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;