Ticket #14330: image_storage_read_binary.diff
File image_storage_read_binary.diff, 712 bytes (added by , 14 years ago) |
---|
-
tests/regressiontests/file_storage/tests.py
375 375 """ 376 376 from django.core.files.images import ImageFile 377 377 img_path = os.path.join(os.path.dirname(__file__), "test.png") 378 image = ImageFile(open(img_path ))378 image = ImageFile(open(img_path, 'rb')) 379 379 image_pil = Image.open(img_path) 380 380 size_1, size_2 = get_image_dimensions(image), get_image_dimensions(image) 381 381 self.assertEqual(image_pil.size, size_1)