mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 09:14:27 +03:00
Specific fix for issue #2278, save fails with PhotoshopInfo tag
This commit is contained in:
parent
1f61c4efd4
commit
1f4699ca5b
|
@ -1011,8 +1011,10 @@ class TiffImageFile(ImageFile.ImageFile):
|
|||
args = rawmode, ""
|
||||
if JPEGTABLES in self.tag_v2:
|
||||
# Hack to handle abbreviated JPEG headers
|
||||
# FIXME This will fail with more than one value
|
||||
self.tile_prefix, = self.tag_v2[JPEGTABLES]
|
||||
# Definition of JPEGTABLES is that the count
|
||||
# is the number of bytes in the tables datastream
|
||||
# so, it should always be 1 in our tag info
|
||||
self.tile_prefix = self.tag_v2[JPEGTABLES]
|
||||
elif compression == "packbits":
|
||||
args = rawmode
|
||||
elif compression == "tiff_lzw":
|
||||
|
|
|
@ -142,6 +142,8 @@ TAGS_V2 = {
|
|||
341: ("SMaxSampleValue", DOUBLE, 0),
|
||||
342: ("TransferRange", SHORT, 6),
|
||||
|
||||
347: ("JPEGTables", UNDEFINED, 1),
|
||||
|
||||
# obsolete JPEG tags
|
||||
512: ("JPEGProc", SHORT, 1),
|
||||
513: ("JPEGInterchangeFormat", LONG, 1),
|
||||
|
@ -158,7 +160,10 @@ TAGS_V2 = {
|
|||
531: ("YCbCrPositioning", SHORT, 1),
|
||||
532: ("ReferenceBlackWhite", LONG, 0),
|
||||
|
||||
700: ('XMP', BYTE, 1),
|
||||
|
||||
33432: ("Copyright", ASCII, 1),
|
||||
34377: ('PhotoshopInfo', BYTE, 1),
|
||||
|
||||
# FIXME add more tags here
|
||||
34665: ("ExifIFD", SHORT, 1),
|
||||
|
|
Loading…
Reference in New Issue
Block a user