From 65a150e7877af228fe05b9b22497709aa4f9133f Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Sun, 2 Oct 2022 22:49:05 -0500 Subject: webp: intial support for WebP images, using libwebp --- main.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index e3bdaae..1e3c237 100644 --- a/main.c +++ b/main.c @@ -29,6 +29,9 @@ #if defined(WBG_HAVE_JPG) #include "jpg.h" #endif +#if defined(WBG_HAVE_WEBP) + #include "webp.h" +#endif /* Top-level globals */ static struct wl_display *display; @@ -365,6 +368,10 @@ main(int argc, const char *const *argv) #if defined(WBG_HAVE_PNG) if (image == NULL) image = png_load(fp, image_path); +#endif +#if defined(WBG_HAVE_WEBP) + if (image == NULL) + image = webp_load(fp, image_path); #endif if (image == NULL) { fprintf(stderr, "error: %s: failed to load\n", image_path); -- cgit v1.2.3