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 Andrew Murray
parent d11aa4b21d
commit a70da8112d

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]