[scribus] patching getImageScale()
José Antonio Rocha
joseantoniorocha at gmail.com
Tue Feb 15 19:51:02 CET 2011
2011/2/15 a.l.e <ale.comp_06 at xox.ch>
> is anybody using a script which already uses the value returned by
> getImageScale()?
> (comparing the X and Y value does not count: the proportions among X and Y
> scale will not be changed, except in the case you have pictures which really
> weird X and Y resolutions).
>
Here is how I adjust images to frame:
##########################
# Fit image to frame
##########################
SCALETOFRAME = 1
FREESCALE = 0
PROPORTIONAL = 1
DISTORTED = 0
def adjustImageToFrame(frame):
"""Adjust bitmap image to frame."""
scribus.setScaleImageToFrame(SCALETOFRAME,DISTORTED,frame)
s = *scribus.getImageScale(**frame)*
m = max(s[0],s[1])
scribus.setScaleImageToFrame(FREESCALE,PROPORTIONAL,frame)
scribus.scaleImage(m,m,frame) # scaleImage depracated (?)
--
------------------------------
[image: Meira]nome: "José Antonio Meira da Rocha" tratamento: "Prof. MS."
cargo: "Coordenador do Curso de Relações Públicas Multimídia"
ies: "CESNORS/Universidade Federal de Santa Maria"
googletalk: email: MSN: joseantoniorocha at gmail.com
ICQ: 658222 Skype: "meiradarocha_jor"
veículo: [ http://meiradarocha.jor.br ]
fone: (55) 9651-0686
------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scribus.net/pipermail/scribus/attachments/20110215/8c871511/attachment.htm>
More information about the scribus
mailing list