diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2015-08-17 00:43:57 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2015-08-17 00:43:57 +0000 |
| commit | fbd80d77d08c63a1e7ad0c3d4701fc1493d0b0bc (patch) | |
| tree | a4094653f085e004bd7b084f267644d5067cfa87 /src/extension/internal/gdkpixbuf-input.cpp | |
| parent | Fixes doubled transparency computation on bitmaps for some reason (diff) | |
| download | inkscape-fbd80d77d08c63a1e7ad0c3d4701fc1493d0b0bc.tar.gz inkscape-fbd80d77d08c63a1e7ad0c3d4701fc1493d0b0bc.zip | |
import images with dpi from file : xscale and yscale were not rounded but floored, which resulted in 0 values for big images, and numerical mayhem ensued ("inf" and "nan").
Fixed bugs:
- https://launchpad.net/bugs/1479193
(bzr r14307)
Diffstat (limited to 'src/extension/internal/gdkpixbuf-input.cpp')
| -rw-r--r-- | src/extension/internal/gdkpixbuf-input.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index f5fab1fa2..f99c9050d 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -86,8 +86,8 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) ir = new ImageResolution(uri); } if (ir && ir->ok()) { - xscale = 960.0 / floor(10.*ir->x() + .5); // round-off to 0.1 dpi - yscale = 960.0 / floor(10.*ir->y() + .5); + xscale = 960.0 / round(10.*ir->x() + .5); // round-off to 0.1 dpi + yscale = 960.0 / round(10.*ir->y() + .5); } else { xscale = 96.0 / defaultxdpi; yscale = 96.0 / defaultxdpi; |
