Ticket #26393: patch-image-split.diff

File patch-image-split.diff, 754 bytes (added by charles@…, 14 years ago)

Patch resolving issue

  • PIL/Image.py

    # 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: 
    14941494    def split(self):
    14951495        "Split image into bands"
    14961496
     1497        self.load()
    14971498        if self.im.bands == 1:
    14981499            ims = [self.copy()]
    14991500        else:
    15001501            ims = []
    1501             self.load()
    15021502            for i in range(self.im.bands):
    15031503                ims.append(self._new(self.im.getband(i)))
    15041504        return tuple(ims)