summaryrefslogtreecommitdiffstats
path: root/src/selection-chemistry.cpp
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2013-09-14 01:59:43 +0000
committerKrzysztof KosiƄski <tweenk.pl@gmail.com>2013-09-14 01:59:43 +0000
commit35dc2e5a640375d51119f2051a240454b5f5b8c8 (patch)
tree2b35e5a1068a675c9c27cb13eaec598410a9b787 /src/selection-chemistry.cpp
parentFix serious bug in recent GdkPixbuf / Cairo interop rework (diff)
downloadinkscape-35dc2e5a640375d51119f2051a240454b5f5b8c8.tar.gz
inkscape-35dc2e5a640375d51119f2051a240454b5f5b8c8.zip
Do not recompress images when embedding and generating PDFs.
Fixes blocker bug #871563. Fixed bugs: - https://launchpad.net/bugs/871563 (bzr r12516)
Diffstat (limited to 'src/selection-chemistry.cpp')
-rw-r--r--src/selection-chemistry.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index 5976555f4..868f5a35c 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -3457,6 +3457,7 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop)
}
t = Geom::Scale(1, -1) * Geom::Translate(shift_x, shift_y) * eek.inverse(); /// @fixme hardcoded doc2dt transform?
+ // TODO: avoid roundtrip via file
// Do the export
sp_export_png_file(document, filepath,
bbox->min()[Geom::X], bbox->min()[Geom::Y],
@@ -3483,7 +3484,7 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop)
if (pb) {
// Create the repr for the image
Inkscape::XML::Node * repr = xml_doc->createElement("svg:image");
- sp_embed_image(repr, pb, "image/png");
+ sp_embed_image(repr, pb);
if (res == Inkscape::Util::Quantity::convert(1, "in", "px")) { // for default 90 dpi, snap it to pixel grid
sp_repr_set_svg_double(repr, "width", width);
sp_repr_set_svg_double(repr, "height", height);