Merge pull request #15 from sfllaw/master

Backport fix to split() after open() (regression in 1.1.7).
This commit is contained in:
Alex Clark 2012-01-20 10:59:26 -08:00
commit 73b4a6b0b0

View File

@ -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)