mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-28 10:56:18 +03:00
load image before getting channels
This commit is contained in:
parent
349e300d7b
commit
1a7cb317be
|
@ -1968,6 +1968,7 @@ class Image(object):
|
|||
("A" for alpha channel of "RGBA").
|
||||
:returns: An image in "L" mode.
|
||||
"""
|
||||
self.load()
|
||||
|
||||
if isStringType(channel) and len(channel) == 1:
|
||||
if channel in self.im.mode:
|
||||
|
|
Loading…
Reference in New Issue
Block a user