[英]How to open multiple images using Wand and Python
我正在尝试使用imagemagick来获取几个JPG并将它们放在pdf上
我正处于项目的开始阶段,我不明白如何打开多个图像并执行此操作。
我的研究表明,只需将convert()函数传递给多个文件,就可以在命令行中实现。 经验告诉我,这不是用魔杖完成的,但我无法弄清楚如何!
任何建议表示赞赏!
import os
from wand.image import Image
from wand.display import display
path = "____absolute_dir_path____ (ex. /home/kim/work/)"
dirList=os.listdir(path)
for fname in dirList:
print fname
with Image(filename=path+fname) as img:
print img.size
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.