Commit fc95516b by sikang

test

parent 338dc5f7
......@@ -38,14 +38,12 @@ class ImageGarble:
for file in files:
if file.endswith(".png") or file.endswith(".webp"):
path = os.path.join(root,file)
os.system("md5 %s"%path)
try:
img = Image.open(path)
img.putpixel((0,0),(random.randint(0,255),random.randint(0,255),random.randint(0,255),random.randint(0,255)))
img.save(path)
except:
print(path + " 处理失败")
os.system("md5 %s"%path)
print(path + " 图片处理失败")
#创建随机图片
if len(files) > 0 and (".png" in str(files) or ".webp" in str(files)) :
print(root)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment