mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 09:44:31 +03:00
Replace lena_g4.tif with hopper_g4.tif
This commit is contained in:
parent
c417b51115
commit
5957f5c812
|
@ -15,20 +15,20 @@ class TestFileLibTiffSmall(LibTiffTestCase):
|
||||||
file just before reading in libtiff. These tests remain
|
file just before reading in libtiff. These tests remain
|
||||||
to ensure that it stays fixed. """
|
to ensure that it stays fixed. """
|
||||||
|
|
||||||
def test_g4_lena_file(self):
|
def test_g4_hopper_file(self):
|
||||||
"""Testing the open file load path"""
|
"""Testing the open file load path"""
|
||||||
|
|
||||||
file = "Tests/images/lena_g4.tif"
|
file = "Tests/images/hopper_g4.tif"
|
||||||
with open(file, 'rb') as f:
|
with open(file, 'rb') as f:
|
||||||
im = Image.open(f)
|
im = Image.open(f)
|
||||||
|
|
||||||
self.assertEqual(im.size, (128, 128))
|
self.assertEqual(im.size, (128, 128))
|
||||||
self._assert_noerr(im)
|
self._assert_noerr(im)
|
||||||
|
|
||||||
def test_g4_lena_bytesio(self):
|
def test_g4_hopper_bytesio(self):
|
||||||
"""Testing the bytesio loading code path"""
|
"""Testing the bytesio loading code path"""
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
file = "Tests/images/lena_g4.tif"
|
file = "Tests/images/hopper_g4.tif"
|
||||||
s = BytesIO()
|
s = BytesIO()
|
||||||
with open(file, 'rb') as f:
|
with open(file, 'rb') as f:
|
||||||
s.write(f.read())
|
s.write(f.read())
|
||||||
|
@ -38,10 +38,10 @@ class TestFileLibTiffSmall(LibTiffTestCase):
|
||||||
self.assertEqual(im.size, (128, 128))
|
self.assertEqual(im.size, (128, 128))
|
||||||
self._assert_noerr(im)
|
self._assert_noerr(im)
|
||||||
|
|
||||||
def test_g4_lena(self):
|
def test_g4_hopper(self):
|
||||||
"""The 128x128 lena image fails for some reason. Investigating"""
|
"""The 128x128 lena image failed for some reason."""
|
||||||
|
|
||||||
file = "Tests/images/lena_g4.tif"
|
file = "Tests/images/hopper_g4.tif"
|
||||||
im = Image.open(file)
|
im = Image.open(file)
|
||||||
|
|
||||||
self.assertEqual(im.size, (128, 128))
|
self.assertEqual(im.size, (128, 128))
|
||||||
|
|
|
@ -31,26 +31,25 @@ class TestFileTiffMetadata(PillowTestCase):
|
||||||
self.assertEqual(loaded.tag[50839], textdata)
|
self.assertEqual(loaded.tag[50839], textdata)
|
||||||
|
|
||||||
def test_read_metadata(self):
|
def test_read_metadata(self):
|
||||||
img = Image.open('Tests/images/lena_g4.tif')
|
img = Image.open('Tests/images/hopper_g4.tif')
|
||||||
|
|
||||||
known = {'YResolution': ((1207959552, 16777216),),
|
known = {'YResolution': ((4294967295L, 113653537),),
|
||||||
'PlanarConfiguration': (1,),
|
'PlanarConfiguration': (1,),
|
||||||
'BitsPerSample': (1,),
|
'BitsPerSample': (1,),
|
||||||
'ImageLength': (128,),
|
'ImageLength': (128,),
|
||||||
'Compression': (4,),
|
'Compression': (4,),
|
||||||
'FillOrder': (1,),
|
'FillOrder': (1,),
|
||||||
'DocumentName': 'lena.g4.tif',
|
|
||||||
'RowsPerStrip': (128,),
|
'RowsPerStrip': (128,),
|
||||||
'ResolutionUnit': (1,),
|
'ResolutionUnit': (3,),
|
||||||
'PhotometricInterpretation': (0,),
|
'PhotometricInterpretation': (0,),
|
||||||
'PageNumber': (0, 1),
|
'PageNumber': (0, 1),
|
||||||
'XResolution': ((1207959552, 16777216),),
|
'XResolution': ((4294967295L, 113653537),),
|
||||||
'ImageWidth': (128,),
|
'ImageWidth': (128,),
|
||||||
'Orientation': (1,),
|
'Orientation': (1,),
|
||||||
'StripByteCounts': (1796,),
|
'StripByteCounts': (1968,),
|
||||||
'SamplesPerPixel': (1,),
|
'SamplesPerPixel': (1,),
|
||||||
'StripOffsets': (8,),
|
'StripOffsets': (8,),
|
||||||
'Software': 'ImageMagick 6.5.7-8 2012-08-17 Q16 http://www.imagemagick.org'}
|
}
|
||||||
|
|
||||||
# self.assertEqual is equivalent,
|
# self.assertEqual is equivalent,
|
||||||
# but less helpful in telling what's wrong.
|
# but less helpful in telling what's wrong.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user