1. Mike Orr
  2. patch-WebHelpers


Mike Orr  committed cebd83f

Bugfix in ``get_dimensions_pil``.

  • Participants
  • Parent commits 09cec19
  • Branches trunk

Comments (0)

Files changed (2)


View file
  • Ignore whitespace
 * webhelpers.html.tools:
   - Fix HTML overescaping and underescaping in auto_link().  Patch by Marius
+* webhelpers.media:
+  - Bugfix in ``get_dimensions_pil``.
 * webhelpers.paginate:
   - Change for SQLAlchemy 0.6. (bug #11)
 * webhelpers.pylonslib:

File webhelpers/media.py

View file
  • Ignore whitespace
     """Get an image's size using the Python Imaging Library (PIL)
     Returns ``(width, height)`` as two integers, or ``default`` if the size
-    could not be ascertained.  Failuer usually means the file does not exist
+    could not be ascertained.  Failure usually means the file does not exist
     or is not in a format recognized by PIL.
     Depends on the Python Imaging Library (http://pypi.python.org/pypi/PIL).
     import Image
-        im = Image(path)
+        im = Image.open(path)
     except Exception:
         return default
     return im.size