1
0
mirror of https://github.com/ciromattia/kcc synced 2025-12-13 01:36:27 +00:00

fix multiframe gif images (#1089)

This commit is contained in:
Alex Xu
2025-09-21 09:12:26 -07:00
committed by GitHub
parent ae1989335e
commit a031e4622e

View File

@@ -151,7 +151,8 @@ class ComicPageParser:
# Detect corruption in source image, let caller catch any exceptions triggered.
srcImgPath = os.path.join(source[0], source[1])
Image.open(srcImgPath).verify()
self.image = Image.open(srcImgPath)
with Image.open(srcImgPath) as im:
self.image = im.copy()
self.fill = self.fillCheck()
# backwards compatibility for Pillow >9.1.0