* poppler/Gfx.cc: Accept reals for width and height of images. Fixes
KDE bug 143322
diff --git a/ChangeLog b/ChangeLog
index ec97b4c..96ed058 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-03-22 Albert Astals Cid <aacid@kde.org>
+
+ * poppler/Gfx.cc: Accept reals for width and height of images. Fixes
+ KDE bug 143322
+
2007-03-15 Albert Astals Cid <aacid@kde.org>
* glib/Makefile.am: Make it build with BSD/Make. Patch by
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index df8cb57..6ebe4e4 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -2955,18 +2955,24 @@
obj1.free();
dict->lookup("W", &obj1);
}
- if (!obj1.isInt())
+ if (obj1.isInt())
+ width = obj1.getInt();
+ else if (obj1.isReal())
+ width = (int)obj1.getReal();
+ else
goto err2;
- width = obj1.getInt();
obj1.free();
dict->lookup("Height", &obj1);
if (obj1.isNull()) {
obj1.free();
dict->lookup("H", &obj1);
}
- if (!obj1.isInt())
+ if (obj1.isInt())
+ height = obj1.getInt();
+ else if (obj1.isReal())
+ height = (int)obj1.getReal();
+ else
goto err2;
- height = obj1.getInt();
obj1.free();
// image or mask?