有没有一个好的方法来修剪由PDF生成的jpg周围的白色边框魔杖图像,还是应该使用其他软件包?jpg的边框颜色也不同。下面的代码为每个部件生成图像文件。只是不知道如何修剪空白
from wand.image import Image
f = "my_pdf.pdf"
with Image(file=f, resolution=72) as document:
for page_number, page in enumerate(document.sequence):
with Image(page) as img:
img.compression_quality = 70
bytes_io_file = BytesIO(img.make_blob('JPEG'))
我的系统:Ubuntu16上的Python2.7
提前谢谢你!在
应该有一个^{} 方法来完成此操作。在
相关问题 更多 >
编程相关推荐