def load_image(filename):
image = None
if wand is not None:
try:
image=wand.image.Image(filename=filename)
except:
image = None
return image
elif PIL is not None:
try:
image=PIL.Image.open(filename)
except:
image = None
print(filename+" is not a invalid img!")
return image
else:
sys.stderr.write('You must have wand or Pillow/PIL installed to use the dhash command\n')
sys.exit(1)
ImageSimilarFinder.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录