def create_thumb(image_doc, photo_mount_path):
filename = image_doc['PicturePath']
if filename:
# try:
filename = filename.replace(u'\\', '/')
image_path = photo_mount_path + '/' + filename
binary = binarize_image(image_path)
else:
binary = None
print '%s: has no file name' % image_doc['PictureId']
return binary
评论列表
文章目录