summaryrefslogtreecommitdiffstats
path: root/src/extension/internal/image-resolution.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/extension/internal/image-resolution.cpp')
-rw-r--r--src/extension/internal/image-resolution.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/extension/internal/image-resolution.cpp b/src/extension/internal/image-resolution.cpp
index f092b21ef..e96fd6437 100644
--- a/src/extension/internal/image-resolution.cpp
+++ b/src/extension/internal/image-resolution.cpp
@@ -354,8 +354,15 @@ void ImageResolution::readmagick(char const *fn) {
return;
}
+ std::string const type = image.magick();
x_ = image.xResolution();
y_ = image.yResolution();
+
+// TODO: find out why the hell the following convertion is necessary
+ if (type == "BMP") {
+ x_ = Inkscape::Util::Quantity::convert(x_, "in", "cm");
+ y_ = Inkscape::Util::Quantity::convert(y_, "in", "cm");
+ }
if (x_ != 0 && y_ != 0) {
ok_ = true;