diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2015-12-05 22:54:11 +0000 |
|---|---|---|
| committer | jabiertxof <jabier.arraiza@marker.es> | 2015-12-05 22:54:11 +0000 |
| commit | 83a455749f1990090cd051ddd5e11b0f3272e4c2 (patch) | |
| tree | 01818331c3e0e9ef2f5d599f8eb631c65fd15a85 /src/extension/internal/gdkpixbuf-input.cpp | |
| parent | String desc fix (diff) | |
| parent | Handle units in the 'x', 'y', 'dx', and 'dy' text and tspan attributes. (diff) | |
| download | inkscape-83a455749f1990090cd051ddd5e11b0f3272e4c2.tar.gz inkscape-83a455749f1990090cd051ddd5e11b0f3272e4c2.zip | |
update to trunk
(bzr r14500.1.7)
Diffstat (limited to 'src/extension/internal/gdkpixbuf-input.cpp')
| -rw-r--r-- | src/extension/internal/gdkpixbuf-input.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index f99c9050d..c15e28854 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -86,8 +86,13 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) ir = new ImageResolution(uri); } if (ir && ir->ok()) { - xscale = 960.0 / round(10.*ir->x() + .5); // round-off to 0.1 dpi - yscale = 960.0 / round(10.*ir->y() + .5); + xscale = 960.0 / round(10.*ir->x()); // round-off to 0.1 dpi + yscale = 960.0 / round(10.*ir->y()); + // prevent crash on image with too small dpi (bug 1479193) + if (ir->x() <= .05) + xscale = 960.0; + if (ir->y() <= .05) + yscale = 960.0; } else { xscale = 96.0 / defaultxdpi; yscale = 96.0 / defaultxdpi; |
