mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-28 19:06:18 +03:00
Merge pull request #6116 from radarhere/load_prepare
This commit is contained in:
commit
06396094c0
|
@ -155,14 +155,6 @@ class PsdImageFile(ImageFile.ImageFile):
|
||||||
# return layer number (0=image, 1..max=layers)
|
# return layer number (0=image, 1..max=layers)
|
||||||
return self.frame
|
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):
|
def _close__fp(self):
|
||||||
try:
|
try:
|
||||||
if self.__fp != self.fp:
|
if self.__fp != self.fp:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user