mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
Add a layer to hopper.psd, because lena.psd had layers
This commit is contained in:
parent
91aa29ca2b
commit
0aa48600a2
|
@ -180,7 +180,6 @@ def tostring(im, format, **options):
|
|||
return out.getvalue()
|
||||
|
||||
|
||||
# Note: hopper() should be used in place of lena(), which will be removed.
|
||||
def hopper(mode="RGB", cache={}):
|
||||
from PIL import Image
|
||||
im = None
|
||||
|
@ -201,27 +200,6 @@ def hopper(mode="RGB", cache={}):
|
|||
return im
|
||||
|
||||
|
||||
# Note: hopper() should be used instead lena(), which will be removed.
|
||||
def lena(mode="RGB", cache={}):
|
||||
from PIL import Image
|
||||
im = None
|
||||
# FIXME: Implement caching to reduce reading from disk but so an original
|
||||
# copy is returned each time and the cached image isn't modified by tests
|
||||
# (for fast, isolated, repeatable tests).
|
||||
# im = cache.get(mode)
|
||||
if im is None:
|
||||
if mode == "RGB":
|
||||
im = Image.open("Tests/images/lena.ppm")
|
||||
elif mode == "F":
|
||||
im = lena("L").convert(mode)
|
||||
elif mode[:4] == "I;16":
|
||||
im = lena("I").convert(mode)
|
||||
else:
|
||||
im = lena("RGB").convert(mode)
|
||||
# cache[mode] = im
|
||||
return im
|
||||
|
||||
|
||||
def command_succeeds(cmd):
|
||||
"""
|
||||
Runs the command, which must be a list of strings. Returns True if the
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 18 KiB |
Binary file not shown.
Loading…
Reference in New Issue
Block a user