I am using wand package to convert a pdf file to tif file. I called Image. transform function to resize the image. 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')
. it did not work either
I believe the argument format for Image.transform()
is the following...
from wand.image import Image
with Image(filename='sample.pdf') as img:
img.transform(resize='50%')
img.save(filename='sample.tif')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.