From 98b9cce77d8d3cdccf8e7ae8060390ea45026dd7 Mon Sep 17 00:00:00 2001 From: John Ellson Date: Tue, 17 Jan 2012 16:23:49 -0500 Subject: [PATCH] misc webp bits --- cmd/dot/Makefile.am | 4 ++++ cmd/dot/dot_builtins.c | 6 ++++++ plugin/webp/gvdevice_webp.c | 2 +- plugin/webp/gvloadimage_webp.c | 6 +++--- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/cmd/dot/Makefile.am b/cmd/dot/Makefile.am index aef1561f8..750e9644e 100644 --- a/cmd/dot/Makefile.am +++ b/cmd/dot/Makefile.am @@ -118,6 +118,10 @@ endif if WITH_PANGOCAIRO dot_static_LDADD += $(top_builddir)/plugin/pango/.libs/libgvplugin_pango_C.a $(PANGOCAIRO_LIBS) dot_builtins_LDADD += $(top_builddir)/plugin/pango/libgvplugin_pango.la $(PANGOCAIRO_LIBS) +if WITH_WEBP +dot_static_LDADD += $(top_builddir)/plugin/webp/.libs/libgvplugin_webp_C.a $(WEBP_LIBS) +dot_builtins_LDADD += $(top_builddir)/plugin/webp/libgvplugin_webp.la $(WEBP_LIBS) +endif endif EXTRA_DIST = Makefile.old dot.1 dot.1.pdf osage.1 osage.1.pdf patchwork.1 patchwork.1.pdf dot.vcproj diff --git a/cmd/dot/dot_builtins.c b/cmd/dot/dot_builtins.c index 1ae1d800a..2a8373243 100644 --- a/cmd/dot/dot_builtins.c +++ b/cmd/dot/dot_builtins.c @@ -28,6 +28,9 @@ extern gvplugin_library_t gvplugin_gd_LTX_library; #endif #ifdef HAVE_PANGOCAIRO extern gvplugin_library_t gvplugin_pango_LTX_library; +#ifdef HAVE_WEBP +extern gvplugin_library_t gvplugin_webp_LTX_library; +#endif #endif extern gvplugin_library_t gvplugin_core_LTX_library; @@ -37,6 +40,9 @@ lt_symlist_t lt_preloaded_symbols[] = { { "gvplugin_neato_layout_LTX_library", (void*)(&gvplugin_neato_layout_LTX_library) }, #ifdef HAVE_PANGOCAIRO { "gvplugin_pango_LTX_library", (void*)(&gvplugin_pango_LTX_library) }, +#ifdef HAVE_WEBP + { "gvplugin_webp_LTX_library", (void*)(&gvplugin_webp_LTX_library) }, +#endif #endif #ifdef HAVE_LIBGD { "gvplugin_gd_LTX_library", (void*)(&gvplugin_gd_LTX_library) }, diff --git a/plugin/webp/gvdevice_webp.c b/plugin/webp/gvdevice_webp.c index 8df9a41c7..ff8ef0943 100644 --- a/plugin/webp/gvdevice_webp.c +++ b/plugin/webp/gvdevice_webp.c @@ -146,7 +146,7 @@ static gvdevice_features_t device_features_webp = { gvplugin_installed_t gvdevice_webp_types[] = { #ifdef HAVE_WEBP - {FORMAT_WEBP, "webp:cairo", -1, &webp_engine, &device_features_webp}, + {FORMAT_WEBP, "webp:cairo", 1, &webp_engine, &device_features_webp}, #endif {0, NULL, 0, NULL, NULL} }; diff --git a/plugin/webp/gvloadimage_webp.c b/plugin/webp/gvloadimage_webp.c index 51bbb013e..3c05fb15b 100644 --- a/plugin/webp/gvloadimage_webp.c +++ b/plugin/webp/gvloadimage_webp.c @@ -95,15 +95,15 @@ end: return NULL; } -#if 1 +#if 0 fprintf(stderr, "Info: WebP file %s can be decoded (dimensions: %d x %d)%s.\n", in_file, output_buffer->width, output_buffer->height, bitstream->has_alpha ? " (with alpha)" : ""); #endif -#if 0 +#if 1 - // FIXME - this statement dies.... + // FIXME - this statement dies.... but works in dot_static!!! surface = cairo_image_surface_create_for_data ( output_buffer->u.RGBA.rgba, -- 2.40.0