1
0
mirror of https://github.com/ciromattia/kcc synced 2026-06-19 13:00:41 +00:00

Pillow update

This commit is contained in:
Paweł Jastrzębski
2015-01-02 09:27:54 +01:00
parent f66c83425c
commit b629b45d46
7 changed files with 33 additions and 39 deletions
+4 -10
View File
@@ -25,17 +25,11 @@ from hashlib import md5
def getImageFileName(imgfile):
filename = os.path.splitext(imgfile)
if filename[0].startswith('.') or\
(filename[1].lower() != '.png' and
filename[1].lower() != '.jpg' and
filename[1].lower() != '.gif' and
filename[1].lower() != '.tif' and
filename[1].lower() != '.tiff' and
filename[1].lower() != '.bmp' and
filename[1].lower() != '.jpeg'):
name, ext = os.path.splitext(imgfile)
ext = ext.lower()
if name.startswith('.') or (ext != '.png' and ext != '.jpg' and ext != '.jpeg' and ext != '.gif'):
return None
return filename
return [name, ext]
def walkLevel(some_dir, level=1):