[Scribus] Scripter Image manipulation -- something missing?

Gregory Pittman gpittman
Sun Jan 9 04:18:29 CET 2005


While I wait for the scaleToFrameSize command, I am trying to load an 
image and then scale it, but can't get it to work.
Here is the sequence of commands that are the essence of what I am doing:

                a = CreateImage(50, 50, 300, 200)
                loadImage(imagedir + '-001.jpg', a)  # an abitrary image 
as a test
                scaleImage(0.15, 0.15, a)
                redrawAll()

It loads the image but doesn't actually scale it.  Curiously, the 
Properties toolbox says that the image is scaled to 15%, but it's not.  
When I click on Scale to Frame Size, then it resizes (to about 16% for 
the frame size I made).
If I leave Free Scaling highlighted, clicking on the X and Y scaling 
arrows will increase/decrease the  scaling but only in reference to the 
wrong scaling; i.e., if I click down to 14%, it will get a bit smaller, 
but still much too big.  Also, if I erase the 15% and type in something 
else -- no change.  There is no indication the frame is locked.

I added the redrawAll (and setRedraw=(True)) but these make no difference.

Wait a second, here's something (I've been going back and forth, 
editing, retrying as I compose this): if I right-click on the image and 
select 'Update Picture', it fixes it!  Now if there were an 
updatePicture() command in Scripter...

BTW, this is using the brand-new 1.2.1 version, not cvs.

Greg




More information about the scribus mailing list