From fe35a18db0f257e12dcb7d170c5a7cb35e2c5eb9 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Wed, 9 Dec 2015 20:39:49 +0000 Subject: [PATCH] Possible fix for issue #1561, let rows per strip through, but block the other two --- PIL/TiffImagePlugin.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PIL/TiffImagePlugin.py b/PIL/TiffImagePlugin.py index a84d01755..298c48759 100644 --- a/PIL/TiffImagePlugin.py +++ b/PIL/TiffImagePlugin.py @@ -1277,8 +1277,10 @@ def _save(im, fp, filename): except io.UnsupportedOperation: pass - # ICC Profile crashes. - blocklist = [STRIPOFFSETS, STRIPBYTECOUNTS, ROWSPERSTRIP, ICCPROFILE] + # STRIPOFFSETS and STRIPBYTECOUNTS are added by the library + # based on the data in the strip. + # ICCPROFILE crashes. + blocklist = [STRIPOFFSETS, STRIPBYTECOUNTS, ICCPROFILE] atts = {} # bits per sample is a single short in the tiff directory, not a list. atts[BITSPERSAMPLE] = bits[0]