mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-12 18:26:17 +03:00
PhotometricInterpretation is set from SAVE_INFO, not the original image, so spurious test failure.
This commit is contained in:
parent
63995459bc
commit
388c25b781
|
@ -111,6 +111,7 @@ def test_write_metadata():
|
||||||
""" Test metadata writing through libtiff """
|
""" Test metadata writing through libtiff """
|
||||||
img = Image.open('Tests/images/lena_g4.tif')
|
img = Image.open('Tests/images/lena_g4.tif')
|
||||||
f = tempfile('temp.tiff')
|
f = tempfile('temp.tiff')
|
||||||
|
|
||||||
img.save(f, tiffinfo = img.tag)
|
img.save(f, tiffinfo = img.tag)
|
||||||
|
|
||||||
loaded = Image.open(f)
|
loaded = Image.open(f)
|
||||||
|
@ -118,7 +119,8 @@ def test_write_metadata():
|
||||||
original = img.tag.named()
|
original = img.tag.named()
|
||||||
reloaded = loaded.tag.named()
|
reloaded = loaded.tag.named()
|
||||||
|
|
||||||
ignored = ['StripByteCounts', 'RowsPerStrip', 'PageNumber']
|
# PhotometricInterpretation is set from SAVE_INFO, not the original image.
|
||||||
|
ignored = ['StripByteCounts', 'RowsPerStrip', 'PageNumber', 'PhotometricInterpretation']
|
||||||
|
|
||||||
for tag, value in reloaded.items():
|
for tag, value in reloaded.items():
|
||||||
if tag not in ignored:
|
if tag not in ignored:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user