0

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

Yuyeyuan
  • 1
  • 1

1 Answers1

0

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')
emcconville
  • 23,800
  • 4
  • 50
  • 66