mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-25 17:36:18 +03:00
Backport fix to split() after open() (regression in 1.1.7).
https://bitbucket.org/effbot/pil-2009-raclette/changeset/fb7ce579f5f9
This commit is contained in:
parent
f170eced0b
commit
5355fea83e
|
@ -1494,11 +1494,11 @@ class Image:
|
|||
def split(self):
|
||||
"Split image into bands"
|
||||
|
||||
self.load()
|
||||
if self.im.bands == 1:
|
||||
ims = [self.copy()]
|
||||
else:
|
||||
ims = []
|
||||
self.load()
|
||||
for i in range(self.im.bands):
|
||||
ims.append(self._new(self.im.getband(i)))
|
||||
return tuple(ims)
|
||||
|
|
Loading…
Reference in New Issue
Block a user