diff options
author | Albert Astals Cid <aacid@kde.org> | 2007-03-22 20:59:53 +0000 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2007-03-22 20:59:53 +0000 |
commit | d0c68226cf3368052183739b31e7e0ac3f314325 (patch) | |
tree | 05ad6beb7cbd8cefb38b8ef9b7b403d0e0ea61f6 | |
parent | 415078d1eaf5763b6f9f5895bfa3c993e4b90c1e (diff) |
* poppler/Gfx.cc: Accept reals for width and height of images. Fixespoppler-0.5
KDE bug 143322
-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? |