[eog] Render compressed SVGs natively as well
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] Render compressed SVGs natively as well
- Date: Wed, 27 Jul 2011 12:36:56 +0000 (UTC)
commit 0773b4ef16a95eb071e9c40c173ea73bfc6ca479
Author: Felix Riemann <friemann gnome org>
Date: Wed Jul 27 14:30:18 2011 +0200
Render compressed SVGs natively as well
These have a different mime-type which didn't trigger the native
renderer before and thus were rendered and pixelated using GdkPixbuf.
https://bugzilla.gnome.org/show_bug.cgi?id=655377
src/eog-image.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/eog-image.c b/src/eog-image.c
index 64404b3..7c4e896 100644
--- a/src/eog-image.c
+++ b/src/eog-image.c
@@ -65,6 +65,11 @@
#endif
#endif
+#ifdef HAVE_RSVG
+#include <librsvg/rsvg.h>
+#include <librsvg/librsvg-features.h>
+#endif
+
#define EOG_IMAGE_GET_PRIVATE(object) \
(G_TYPE_INSTANCE_GET_PRIVATE ((object), EOG_TYPE_IMAGE, EogImagePrivate))
@@ -983,7 +988,11 @@ eog_image_real_load (EogImage *img,
priv->svg = NULL;
}
- if (!strcmp (mime_type, "image/svg+xml")) {
+ if (!strcmp (mime_type, "image/svg+xml")
+#if LIBRSVG_CHECK_FEATURE(SVGZ)
+ || !strcmp (mime_type, "image/svg+xml-compressed")
+#endif
+ ) {
gchar *file_path;
/* Keep the object for rendering */
priv->svg = rsvg_handle_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]