From 208b98bb44b986e62ff0f80b7e50c9da3e12cb8f Mon Sep 17 00:00:00 2001 From: Sven Weidauer Date: Sat, 5 Mar 2011 09:49:15 +0000 Subject: Created content handler CONTENT_APPLE_IMAGE for Mac OS X that can handle all image file formats supported by Apples ImageIO framework. Right now used only for JPEG to get rid of libjpeg dependency. svn path=/trunk/netsurf/; revision=11911 --- content/content.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'content/content.c') diff --git a/content/content.c b/content/content.c index cac5c97e7..41d922d62 100644 --- a/content/content.c +++ b/content/content.c @@ -83,6 +83,10 @@ #ifdef WITH_AMIGA_ICON #include "amiga/icon.h" #endif +#ifdef WITH_APPLE_IMAGE +#include "cocoa/apple_image.h" +#endif + #include "utils/http.h" #include "utils/log.h" #include "utils/messages.h" @@ -140,6 +144,10 @@ static const struct mime_entry mime_map[] = { {"image/jpeg", CONTENT_JPEG}, {"image/jpg", CONTENT_JPEG}, #endif +#ifdef WITH_APPLE_IMAGE + {"image/jpeg", CONTENT_APPLE_IMAGE}, + {"image/jpg", CONTENT_APPLE_IMAGE}, +#endif #ifdef WITH_MNG {"image/mng", CONTENT_MNG}, #endif @@ -149,6 +157,9 @@ static const struct mime_entry mime_map[] = { #ifdef WITH_JPEG {"image/pjpeg", CONTENT_JPEG}, #endif +#ifdef WITH_APPLE_IMAGE + {"image/pjpeg", CONTENT_APPLE_IMAGE}, +#endif #if defined(WITH_MNG) || defined(WITH_PNG) {"image/png", CONTENT_PNG}, #endif @@ -248,6 +259,9 @@ const char * const content_type_name[] = { #endif #ifdef WITH_AMIGA_ICON "AMIGA_ICON", +#endif +#ifdef WITH_APPLE_IMAGE + "APPLE_IMAGE", #endif "OTHER", "UNKNOWN" @@ -384,6 +398,10 @@ static const struct handler_entry handler_map[] = { {0, 0, amiga_icon_convert, 0, amiga_icon_destroy, 0, 0, 0, amiga_icon_redraw, 0, 0, 0, amiga_icon_clone, false}, +#endif +#ifdef WITH_APPLE_IMAGE + {0, 0, apple_image_convert, 0, apple_image_destroy, 0, 0, 0, + apple_image_redraw, apple_image_redraw_tiled, 0, 0, apple_image_clone, false}, #endif {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, false} }; -- cgit v1.2.3