summaryrefslogtreecommitdiffstats
path: root/src/sp-image.cpp
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2013-05-16 16:00:19 +0000
committer~suv <suv-sf@users.sourceforge.net>2013-05-16 16:00:19 +0000
commit58f7c54bdd82261552c308b672e8d5f079bf5c6d (patch)
treec62c20759bfdea3c52cd2805289957731ab38305 /src/sp-image.cpp
parentmerge from trunk (r12322) (diff)
parentWin32. More include fixes for glibmm 2.36 (file dialog). (diff)
downloadinkscape-58f7c54bdd82261552c308b672e8d5f079bf5c6d.tar.gz
inkscape-58f7c54bdd82261552c308b672e8d5f079bf5c6d.zip
merge from trunk (r12337)
(bzr r11668.1.70)
Diffstat (limited to 'src/sp-image.cpp')
-rw-r--r--src/sp-image.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sp-image.cpp b/src/sp-image.cpp
index dacea3417..d60fbc181 100644
--- a/src/sp-image.cpp
+++ b/src/sp-image.cpp
@@ -42,6 +42,7 @@
#include "xml/quote.h"
#include "xml/repr.h"
#include "snap-candidate.h"
+#include "preferences.h"
#include "io/sys.h"
#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
@@ -63,7 +64,7 @@
g_message( __VA_ARGS__ );\
}
-#include "preferences.h"
+
#include <gtk/gtk.h>
#endif // DEBUG_LCMS
#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
@@ -1469,9 +1470,12 @@ void sp_embed_image( Inkscape::XML::Node *image_node, GdkPixbuf *pb, Glib::ustri
format = "png";
}
+ Inkscape::Preferences *prefs = Inkscape::Preferences::get();
+ Glib::ustring quality = Glib::ustring::format(prefs->getInt("/dialogs/import/quality", 100));
+
gchar *data = 0;
gsize length = 0;
- gdk_pixbuf_save_to_buffer(pb, &data, &length, format.data(), NULL, NULL);
+ gdk_pixbuf_save_to_buffer(pb, &data, &length, format.data(), NULL, "quality", quality.c_str(), NULL);
// Save base64 encoded data in image node
// this formula taken from Glib docs