summaryrefslogtreecommitdiffstats
path: root/src/sp-image.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2013-05-16 16:29:10 +0000
committerJabiertxo Arraiza Zenotz <jtx@jtx.marker.es>2013-05-16 16:29:10 +0000
commitb0d75ca0f9aea3c7652042d1a6300bbfdf1391e8 (patch)
treefe0c3c3eb28289ad60a96ab65ff6954576834ddc /src/sp-image.cpp
parentChange only selected nodes (diff)
parentWin32. More include fixes for glibmm 2.36 (file dialog). (diff)
downloadinkscape-b0d75ca0f9aea3c7652042d1a6300bbfdf1391e8.tar.gz
inkscape-b0d75ca0f9aea3c7652042d1a6300bbfdf1391e8.zip
Update to trunk
(bzr r11950.1.114)
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