Calling ImageMagick's convert

Андрей Парамонов cmr.pent at gmail.com
Mon Dec 22 13:59:46 EST 2008


2008/12/22 Chris Rebert <clp at rebertia.com>:
> I think this needs to be:
>
> subprocess.call(['convert', 'in.png', '-resize', '640x480', 'out.png'])
>
> Otherwise, it gets '-resize 640x480' as a single escaped option when
> it's really 2 options, which is the error message you're getting.
> You have to split the arguments up just like the shell would, which
> basically means at whitespace unless quoting is used, which is not the
> case here.
>
> Cheers,
> Chris

It worked, many thanks!

Andrey



More information about the Python-list mailing list