[poppler] poppler/poppler: Gfx.cc,1.13,1.13.2.1

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Mar 22 13:59:55 PDT 2007


Update of /cvs/poppler/poppler/poppler
In directory kemper:/tmp/cvs-serv27367/poppler

Modified Files:
      Tag: POPPLER_0_5_X
	Gfx.cc 
Log Message:
        * poppler/Gfx.cc: Accept reals for width and height of images. Fixes
        KDE bug 143322


Index: Gfx.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Gfx.cc,v
retrieving revision 1.13
retrieving revision 1.13.2.1
diff -u -d -r1.13 -r1.13.2.1
--- Gfx.cc	21 Sep 2006 22:37:00 -0000	1.13
+++ Gfx.cc	22 Mar 2007 20:59:53 -0000	1.13.2.1
@@ -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?



More information about the poppler mailing list