mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-25 00:34:14 +03:00
commit
572a93c86f
|
@ -239,11 +239,13 @@ class TestFileTiffMetadata(PillowTestCase):
|
|||
def test_PhotoshopInfo(self):
|
||||
im = Image.open("Tests/images/issue_2278.tif")
|
||||
|
||||
self.assertIsInstance(im.tag_v2[34377], bytes)
|
||||
self.assertEqual(len(im.tag_v2[34377]), 1)
|
||||
self.assertIsInstance(im.tag_v2[34377][0], bytes)
|
||||
out = self.tempfile("temp.tiff")
|
||||
im.save(out)
|
||||
reloaded = Image.open(out)
|
||||
self.assertIsInstance(reloaded.tag_v2[34377], bytes)
|
||||
self.assertEqual(len(reloaded.tag_v2[34377]), 1)
|
||||
self.assertIsInstance(reloaded.tag_v2[34377][0], bytes)
|
||||
|
||||
def test_too_many_entries(self):
|
||||
ifd = TiffImagePlugin.ImageFileDirectory_v2()
|
||||
|
|
|
@ -175,9 +175,10 @@ TAGS_V2 = {
|
|||
530: ("YCbCrSubSampling", SHORT, 2),
|
||||
531: ("YCbCrPositioning", SHORT, 1),
|
||||
532: ("ReferenceBlackWhite", RATIONAL, 6),
|
||||
700: ("XMP", BYTE, 1),
|
||||
700: ("XMP", BYTE, 0),
|
||||
33432: ("Copyright", ASCII, 1),
|
||||
34377: ("PhotoshopInfo", BYTE, 1),
|
||||
33723: ("IptcNaaInfo", UNDEFINED, 0),
|
||||
34377: ("PhotoshopInfo", BYTE, 0),
|
||||
# FIXME add more tags here
|
||||
34665: ("ExifIFD", LONG, 1),
|
||||
34675: ("ICCProfile", UNDEFINED, 1),
|
||||
|
|
Loading…
Reference in New Issue
Block a user