Skip to content

Commit

Permalink
Use MAXBLOCK
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Oct 12, 2024
1 parent 08b561e commit 00c5989
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/PIL/TiffImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1937,8 +1937,7 @@ def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None:
encoder = Image._getencoder(im.mode, "libtiff", a, encoderconfig)
encoder.setimage(im.im, (0, 0) + im.size)
while True:
# undone, change to self.decodermaxblock:
errcode, data = encoder.encode(16 * 1024)[1:]
errcode, data = encoder.encode(ImageFile.MAXBLOCK)[1:]
if not _fp:
fp.write(data)
if errcode:
Expand Down

0 comments on commit 00c5989

Please sign in to comment.