load image before getting channels

This commit is contained in:
Alexander 2017-08-09 02:39:53 +03:00
parent 349e300d7b
commit 1a7cb317be

View File

@ -1968,6 +1968,7 @@ class Image(object):
("A" for alpha channel of "RGBA"). ("A" for alpha channel of "RGBA").
:returns: An image in "L" mode. :returns: An image in "L" mode.
""" """
self.load()
if isStringType(channel) and len(channel) == 1: if isStringType(channel) and len(channel) == 1:
if channel in self.im.mode: if channel in self.im.mode: