[英]Problem applying transformation on tiff images using wand
I am using wand package to convert a pdf file to tif file.我正在使用魔杖 package 将 pdf 文件转换为 tif 文件。 I called Image.
我打电话给图像。 transform function to resize the image.
变换 function 以调整图像大小。 Below is the code snippet
下面是代码片段
with Image(filename='sample.pdf') as img:
img.format='TIF'
img.transform('50%')
img.save(filename='sample.tif')
the code throw an xception:wand.exceptions.OptionError: invalide geometry ' @ error/geometry.c/ParseRegionGeometry/1524
I tried transform('800x1100')
.代码抛出
xception:wand.exceptions.OptionError: invalide geometry ' @ error/geometry.c/ParseRegionGeometry/1524
我试过transform('800x1100')
。 it did not work either它也不起作用
I believe the argument format for Image.transform()
is the following...我相信
Image.transform()
的参数格式如下......
from wand.image import Image
with Image(filename='sample.pdf') as img:
img.transform(resize='50%')
img.save(filename='sample.tif')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.