Author Topic: a few minor problems: eg setImageScale  (Read 1985 times)

mike_p

  • Newbie
  • *
  • Posts: 12
  • Karma: 1
a few minor problems: eg setImageScale
« on: May 14, 2011, 11:56:04 am »
I'm very new to scripting in Scribus and Python so please excuse me if I appear to be making any silly mistakes.

I have found the Calendar wizard an excellent starting place to learn the scripting process, but have come across a few things that have me bamboozled.

No 1: (more to follow as I come across them!)

I can't get setImageScale to work.
I'm using vesrion 1.4.0rc3.

Here's the context:
Code: [Select]
setUnit(UNIT_MILLIMETERS)
img = createImage(0,0, self.pagex, self.imageBottom, 'img' + imagename)
loadImage(self.imgsrc + imagename + '.JPG',img)
setImageScale(.24,.24,img)      # doesn't seem to work

However, if I use
Code: [Select]
setProperty( img, 'imageXScale', 0.24)
setProperty( img, 'imageYScale', 0.24)

The correct result is achieved.
(Basic aim is to set the dpi for the image from 72 to 300 to matching the printer's need).

I'm happy that I've found a work-around, but am I making a basic mistake or is there a chance there's a bug in the scripting interface?

ALSO.... can I set the page 'bleed' through scripting?

Thanks for any help and/or advice.

 

palmate