From c0b63c111b86492f0571efeab5183ba1ff2be5ad Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 3 Oct 2010 20:41:31 +0000 Subject: WebP image support, needs libwebp (from trunk/libwebp) and libvpx. Only enabled for Amiga build currently, may have colour issues on little-endian CPUs svn path=/trunk/netsurf/; revision=10860 --- content/content.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'content/content.c') diff --git a/content/content.c b/content/content.c index 5165c6b50..9a8336287 100644 --- a/content/content.c +++ b/content/content.c @@ -77,6 +77,9 @@ #ifdef WITH_PNG #include "image/png.h" #endif +#ifdef WITH_WEBP +#include "image/webp.h" +#endif #include "utils/http.h" #include "utils/log.h" #include "utils/messages.h" @@ -153,6 +156,9 @@ static const struct mime_entry mime_map[] = { #ifdef WITH_BMP {"image/vnd.microsoft.icon", CONTENT_ICO}, #endif +#ifdef WITH_WEBP + {"image/webp", CONTENT_WEBP}, +#endif #ifdef WITH_ARTWORKS {"image/x-artworks", CONTENT_ARTWORKS}, #endif @@ -230,6 +236,9 @@ const char * const content_type_name[] = { #endif #if defined(WITH_NS_SVG) || defined(WITH_RSVG) "SVG", +#endif +#ifdef WITH_WEBP + "WEBP", #endif "OTHER", "UNKNOWN" @@ -359,6 +368,11 @@ static const struct handler_entry handler_map[] = { {rsvg_create, rsvg_process_data, rsvg_convert, 0, rsvg_destroy, 0, 0, 0, rsvg_redraw, 0, 0, 0, rsvg_clone, false}, +#endif +#ifdef WITH_WEBP + {0, 0, webp_convert, + 0, webp_destroy, 0, 0, 0, webp_redraw, 0, + 0, 0, webp_clone, false}, #endif {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false} }; -- cgit v1.2.3