Merge pull request #6116 from radarhere/load_prepare

This commit is contained in:
Hugo van Kemenade 2022-03-10 22:26:00 +02:00 committed by GitHub
commit 06396094c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -155,14 +155,6 @@ class PsdImageFile(ImageFile.ImageFile):
# return layer number (0=image, 1..max=layers)
return self.frame
def load_prepare(self):
# create image memory if necessary
if not self.im or self.im.mode != self.mode or self.im.size != self.size:
self.im = Image.core.fill(self.mode, self.size, 0)
# create palette (optional)
if self.mode == "P":
Image.Image.load(self)
def _close__fp(self):
try:
if self.__fp != self.fp: