mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-14 05:36:48 +03:00
ad784eb808
This is Christoph Gohlke's test suite from his personal PIL package found at http://www.lfd.uci.edu/~gohlke/pythonlibs/. This is just to bring it in as a separate commit. Future commits will align it with Pillow.
24 lines
586 B
Python
24 lines
586 B
Python
import PIL
|
|
import PIL.Image
|
|
|
|
import glob, os
|
|
|
|
for file in glob.glob("../pil-archive/*"):
|
|
f, e = os.path.splitext(file)
|
|
if e in [".txt", ".ttf", ".otf", ".zip"]:
|
|
continue
|
|
try:
|
|
im = PIL.Image.open(file)
|
|
im.load()
|
|
except IOError as v:
|
|
print("-", "failed to open", file, "-", v)
|
|
else:
|
|
print("+", file, im.mode, im.size, im.format)
|
|
if e == ".exif":
|
|
try:
|
|
info = im._getexif()
|
|
except KeyError as v:
|
|
print("-", "failed to get exif info from", file, "-", v)
|
|
|
|
print("ok")
|