@@ -92,17 +92,33 @@ def test_bigtiff(self):
9292 assert_image_equal_tofile (im , "Tests/images/hopper.tif" )
9393
9494 @pytest .mark .parametrize (
95- "file_name,mode,size,offset " ,
95+ "file_name,mode,size,tile " ,
9696 [
97- ("tiff_wrong_bits_per_sample.tiff" , "RGBA" , (52 , 53 ), 160 ),
98- ("tiff_wrong_bits_per_sample_2.tiff" , "RGB" , (16 , 16 ), 8 ),
97+ (
98+ "tiff_wrong_bits_per_sample.tiff" ,
99+ "RGBA" ,
100+ (52 , 53 ),
101+ [("raw" , (0 , 0 , 52 , 53 ), 160 , ("RGBA" , 0 , 1 ))],
102+ ),
103+ (
104+ "tiff_wrong_bits_per_sample_2.tiff" ,
105+ "RGB" ,
106+ (16 , 16 ),
107+ [("raw" , (0 , 0 , 16 , 16 ), 8 , ("RGB" , 0 , 1 ))],
108+ ),
109+ (
110+ "tiff_wrong_bits_per_sample_3.tiff" ,
111+ "RGBA" ,
112+ (512 , 256 ),
113+ [("libtiff" , (0 , 0 , 512 , 256 ), 0 , ("RGBA" , "tiff_lzw" , False , 48782 ))],
114+ ),
99115 ],
100116 )
101- def test_wrong_bits_per_sample (self , file_name , mode , size , offset ):
117+ def test_wrong_bits_per_sample (self , file_name , mode , size , tile ):
102118 with Image .open ("Tests/images/" + file_name ) as im :
103119 assert im .mode == mode
104120 assert im .size == size
105- assert im .tile == [( "raw" , ( 0 , 0 ) + size , offset , ( mode , 0 , 1 ))]
121+ assert im .tile == tile
106122 im .load ()
107123
108124 def test_set_legacy_api (self ):
0 commit comments