Forum: Poser Python Scripting


Subject: How to call ImageMagick from PoserPython

HartyBart opened this issue on Aug 03, 2021 ยท 23 posts


adp001 posted Wed, 04 August 2021 at 9:42 PM

Here is an example from PILs docs:

from PIL import Image
import glob, os

size = 128, 128

for infile in glob.glob("*.jpg"):
    file, ext = os.path.splitext(infile)
    with Image.open(infile) as im:
        im.thumbnail(size)
        im.save(file + ".thumbnail", "JPEG")

The docs are here:

https://pillow.readthedocs.io/en/stable/index.html