add support for "RGBa" to hopper() test helper

This commit is contained in:
Yay295 2022-12-16 08:43:19 -06:00 committed by GitHub
parent 4c8bcea9d5
commit 7d91a873a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -247,7 +247,9 @@ def hopper(mode=None, cache={}):
# (for fast, isolated, repeatable tests).
im = cache.get(mode)
if im is None:
if mode == "La":
if mode == "RGBa":
im = hopper("RGBA").convert(mode)
elif mode == "La":
im = hopper("LA").convert(mode)
elif mode == "F":
im = hopper("L").convert(mode)