Fixed #194 -- thanks, steadicat!
git-svn-id: http://code.djangoproject.com/svn/django/trunk@310 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
12ffae6df4
commit
a6ed088c62
|
@ -9,7 +9,7 @@ import ImageFile
|
||||||
def get_image_dimensions(path):
|
def get_image_dimensions(path):
|
||||||
"""Returns the (width, height) of an image at a given path."""
|
"""Returns the (width, height) of an image at a given path."""
|
||||||
p = ImageFile.Parser()
|
p = ImageFile.Parser()
|
||||||
fp = open(path)
|
fp = open(path, 'rb')
|
||||||
while 1:
|
while 1:
|
||||||
data = fp.read(1024)
|
data = fp.read(1024)
|
||||||
if not data:
|
if not data:
|
||||||
|
|
Loading…
Reference in New Issue