mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 18:06:18 +03:00
Merge pull request #5710 from radarhere/selftest
Moved _info function into docstring
This commit is contained in:
commit
dae542b25e
|
@ -14,17 +14,13 @@ except AttributeError:
|
|||
pass
|
||||
|
||||
|
||||
def _info(im):
|
||||
im.load()
|
||||
return im.format, im.mode, im.size
|
||||
|
||||
|
||||
def testimage():
|
||||
"""
|
||||
PIL lets you create in-memory images with various pixel types:
|
||||
|
||||
>>> from PIL import Image, ImageDraw, ImageFilter, ImageMath
|
||||
>>> im = Image.new("1", (128, 128)) # monochrome
|
||||
>>> def _info(im): return (im.format, im.mode, im.size)
|
||||
>>> _info(im)
|
||||
(None, '1', (128, 128))
|
||||
>>> _info(Image.new("L", (128, 128))) # grayscale (luminance)
|
||||
|
|
Loading…
Reference in New Issue
Block a user