diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2014-04-11 01:52:22 +0000 |
|---|---|---|
| committer | Jabiertxof <jtx@jtx.marker.es> | 2014-04-11 01:52:22 +0000 |
| commit | 8a250d32061cd250c1b6c038570611b45a2e658f (patch) | |
| tree | 877b1b5003799a9ee00b333ce8df8a432a09b21b /src | |
| parent | update to trunk (diff) | |
| parent | Latvian translation update (diff) | |
| download | inkscape-8a250d32061cd250c1b6c038570611b45a2e658f.tar.gz inkscape-8a250d32061cd250c1b6c038570611b45a2e658f.zip | |
update to trunk
(bzr r11950.1.328)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/internal/image-resolution.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/extension/internal/image-resolution.cpp b/src/extension/internal/image-resolution.cpp index 18eb97f80..f092b21ef 100644 --- a/src/extension/internal/image-resolution.cpp +++ b/src/extension/internal/image-resolution.cpp @@ -353,18 +353,13 @@ void ImageResolution::readmagick(char const *fn) { g_warning("ImageResolution::readmagick: Unknown error"); return; } - Magick::Geometry geo = image.density(); - std::string type = image.magick(); - - if (type == "PNG") { // PNG only supports pixelspercentimeter - x_ = Inkscape::Util::Quantity::convert((double)geo.width(), "in", "cm"); - y_ = Inkscape::Util::Quantity::convert((double)geo.height(), "in", "cm"); - } else { - x_ = (double)geo.width(); - y_ = (double)geo.height(); - } - ok_ = true; + x_ = image.xResolution(); + y_ = image.yResolution(); + + if (x_ != 0 && y_ != 0) { + ok_ = true; + } } #else |
