[Scribus] Scripter Image manipulation -- an ugly kludge

Gregory Pittman gpittman
Sun Jan 9 05:02:57 CET 2005

Gregory Pittman wrote:

> Modifying the previous script fragment as below will 'fix' the problem 
> also, in an ugly, inelegant way:
>                a = CreateImage(50, 50, 300, 200)
>                loadImage(imagedir + '-001.jpg', a)
>                scaleImage(0.15, 0.15, a)
>                saveDocAs('/tmp/test.sla')
>                closeDoc()
>                openDoc('/tmp/test.sla')
> If I were doing a series of images, I suppose I would only have to 
> save/close/open once, but even so, very ugly.
Addendum: yes, if I load two images, doing the save/close/open once at 
the end suffices.  Of some added interest is that this script works 
repeatedly, which means that Scripter will overwrite a previous file of 
the same name, without asking and without error -- so in other words one 
would need to code the safeguards into the script.


More information about the scribus mailing list