Python WAND can't change increment on filename

33 Views Asked by At

When I convert PDF to JPG using wand, I want the name to start at 001 instead of 000.

So I have the following lines :

with Img(filename=pdfName, resolution=self.resolution) as pic:
    library.MagickResetIterator(pic.wand)
    pic.scene = 1 # Start cpt of filename at 1 instead of 0
    pic.compression_quality = self.compressionQuality
    pic.background_color = Color("white")
    pic.alpha_channel = 'remove'
    pic.save(filename='full_%03d.jpg')
        

The weird things : On Debian 10 it's working. But on Debian 9 using Python 3.5.3, it's not working

Any ideas ?

0

There are 0 best solutions below