mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 02:16:19 +03:00
missed a set of _v2 versioning
This commit is contained in:
parent
0c35194167
commit
156972874d
|
@ -1085,16 +1085,13 @@ def _save(im, fp, filename):
|
||||||
|
|
||||||
# additions written by Greg Couch, gregc@cgl.ucsf.edu
|
# additions written by Greg Couch, gregc@cgl.ucsf.edu
|
||||||
# inspired by image-sig posting from Kevin Cazabon, kcazabon@home.com
|
# inspired by image-sig posting from Kevin Cazabon, kcazabon@home.com
|
||||||
if hasattr(im, 'tag'):
|
if hasattr(im, 'tag_v2'):
|
||||||
# preserve tags from original TIFF image file
|
# preserve tags from original TIFF image file
|
||||||
orig_api = im.tag.legacy_api
|
|
||||||
im.tag.legacy_api = False
|
|
||||||
for key in (RESOLUTION_UNIT, X_RESOLUTION, Y_RESOLUTION,
|
for key in (RESOLUTION_UNIT, X_RESOLUTION, Y_RESOLUTION,
|
||||||
IPTC_NAA_CHUNK, PHOTOSHOP_CHUNK, XMP):
|
IPTC_NAA_CHUNK, PHOTOSHOP_CHUNK, XMP):
|
||||||
if key in im.tag:
|
if key in im.tag_v2:
|
||||||
ifd[key] = im.tag[key]
|
ifd[key] = im.tag_v2[key]
|
||||||
ifd.tagtype[key] = im.tag.tagtype.get(key, None)
|
ifd.tagtype[key] = im.tag_v2.tagtype.get(key, None)
|
||||||
im.tag.legacy_api = orig_api
|
|
||||||
|
|
||||||
# preserve ICC profile (should also work when saving other formats
|
# preserve ICC profile (should also work when saving other formats
|
||||||
# which support profiles as TIFF) -- 2008-06-06 Florian Hoech
|
# which support profiles as TIFF) -- 2008-06-06 Florian Hoech
|
||||||
|
|
Loading…
Reference in New Issue
Block a user