* src/image.c (syms_of_image)
[HAVE_NATIVE_IMAGE_API && HAVE_NS && NS_IMPL_COCOA]:
Add webp as an image type.
* src/nsimage.m (ns_can_use_native_image_api)
[NS_IMPL_COCOA && !HAVE_WEBP]: Add webp to list of possible image
types in the native image support lookup.
add_image_type (Qpng);
#endif
-#if defined (HAVE_WEBP) || (defined (HAVE_NATIVE_IMAGE_API) \
- && defined (HAVE_HAIKU))
+#if defined (HAVE_WEBP) \
+ || (defined (HAVE_NATIVE_IMAGE_API) \
+ && ((defined (HAVE_NS) && defined (NS_IMPL_COCOA)) \
+ || defined (HAVE_HAIKU)))
DEFSYM (Qwebp, "webp");
DEFSYM (Qwebpdemux, "webpdemux");
add_image_type (Qwebp);
#ifndef HAVE_RSVG
else if (EQ (type, Qsvg))
imageType = @"public.svg-image";
+#endif
+#ifndef HAVE_WEBP
+ else if (EQ (type, Qwebp))
+ imageType = @"org.webmproject.webp";
#endif
else if (EQ (type, Qheic))
imageType = @"public.heic";