From feb3103bfd9dabe8e8e3bfa16c79de8f23ba6d8a Mon Sep 17 00:00:00 2001 From: Fariz Rahman Date: Fri, 30 Jul 2021 00:57:00 +0400 Subject: [PATCH] SGI save handler should not close output stream --- src/PIL/SgiImagePlugin.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/PIL/SgiImagePlugin.py b/src/PIL/SgiImagePlugin.py index d0f7c9993..71e288022 100644 --- a/src/PIL/SgiImagePlugin.py +++ b/src/PIL/SgiImagePlugin.py @@ -193,8 +193,6 @@ def _save(im, fp, filename): for channel in im.split(): fp.write(channel.tobytes("raw", rawmode, 0, orientation)) - fp.close() - class SGI16Decoder(ImageFile.PyDecoder): _pulls_fd = True