diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | poppler/Gfx.cc | 14 |
2 files changed, 15 insertions, 4 deletions
@@ -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 df8cb570..6ebe4e47 100644 --- a/poppler/Gfx.cc +++ b/poppler/Gfx.cc @@ -2955,18 +2955,24 @@ void Gfx::doImage(Object *ref, Stream *str, GBool inlineImg) { 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? |