# HG changeset patch -- Bitbucket.org
# Project pil-2009-raclette
# URL http://bitbucket.org/effbot/pil-2009-raclette/overview
# User Fredrik Lundh <fredrik@effbot.org>
# Date 1272193085 -7200
# Node ID fb7ce579f5f96f7d9008f72ab03eef4f1c6db609
# Parent 45c2debe0fc3d9632372a15826b1b64a35ff43c4
Fixed split after open bug (regression in 1.1.7).
|
|
class Image: |
1494 | 1494 | def split(self): |
1495 | 1495 | "Split image into bands" |
1496 | 1496 | |
| 1497 | self.load() |
1497 | 1498 | if self.im.bands == 1: |
1498 | 1499 | ims = [self.copy()] |
1499 | 1500 | else: |
1500 | 1501 | ims = [] |
1501 | | self.load() |
1502 | 1502 | for i in range(self.im.bands): |
1503 | 1503 | ims.append(self._new(self.im.getband(i))) |
1504 | 1504 | return tuple(ims) |