Add TIFFTAG_SAMPLEFORMAT to blocklist

The SAMPLEFORMAT tag is determined by the image format and should not be copied from legacy_ifd.
This commit is contained in:
Christoph Gohlke 2019-06-27 23:55:01 -07:00 committed by GitHub
parent 119d1c927b
commit f94518bb35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1540,7 +1540,7 @@ def _save(im, fp, filename):
# STRIPOFFSETS and STRIPBYTECOUNTS are added by the library
# based on the data in the strip.
blocklist = [STRIPOFFSETS, STRIPBYTECOUNTS]
blocklist = [STRIPOFFSETS, STRIPBYTECOUNTS, SAMPLEFORMAT]
atts = {}
# bits per sample is a single short in the tiff directory, not a list.
atts[BITSPERSAMPLE] = bits[0]