Python scripting with Paint Shop Pro 8.0

Martin Franklin mfranklin1 at gatwick.westerngeco.slb.com
Mon Jul 21 04:01:24 EDT 2003


On Sunday 20 July 2003 13:48, Marc Wilson wrote:
> Hi,
>
> I'm a complete Python newbie, though I know at least one regular in here.
> :)
>
> I've just got Paint Shop Pro 8.0, and the functionality of the old
> ImageRobot add-on has been replaced with the new Python Scripting.
>
> So far, OK.
>
> What I'm trying to determine is: can I run these scripts from a
> command-line invocation?  I want to use the scripts to automatically
> convert files as they arrive, uploaded onto a website, not interactively.
>
> Has anyone played with this?
> --
> Marc Wilson
>

Marc,

This is not an answer to your question... but if you just want to convert an 
image file into another format then upload it to a server you could use a 
pure python solution (well pure python + PIL)  

PIL is here:- 

http://www.pythonware.com/products/pil/

In fact a quick browse through the handbook and I found this:-

http://www.pythonware.com/library/pil/handbook/pilconvert.htm

and I quote:-

"""
Convert an image from one format to another. The output format is determined 
by the target extension, unless explicitly specified with the -c option.

    $ pilconvert lena.tif lena.png
    $ pilconvert -c JPEG lena.tif lena.tmp


"""

To upload the image to a server you could use the ftplib module...


Regards
Martin


















More information about the Python-list mailing list