Commits

Mike Orr  committed cebd83f

Bugfix in ``get_dimensions_pil``.

  • Participants
  • Parent commits 09cec19

Comments (0)

Files changed (2)

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

File webhelpers/media.py

     """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
     try:
-        im = Image(path)
+        im = Image.open(path)
     except Exception:
         return default
     return im.size