[scribus] Fit photograph to frame

Gregory Pittman gpittman at iglou.com
Thu Nov 26 14:41:05 UTC 2015


On 11/26/2015 09:10 AM, Christian Mandel wrote:
> Am 26.11.2015 um 13:43 schrieb Gregory Pittman:
>> On 11/25/2015 10:27 AM, Christian Mandel wrote:
>>
>>> For me it would, (a) more functionality is almost always useful and (b)
>>> more scripts mean more information to learn from :-)
>>>
>>> Nevertheless, did you check my simpler scripting suggestion (my answer
>>> to your other post)? Is this possible?
>>>
>>
>> I don't see any major advantage to your method; it's not more or less
>> simple. I distort the frame, you would distort the scaling. But I will
>> see if I can manage this.
> 
> I already try it and thereby try to learn a bit of python programming,
> but I cannot get the scaleImage() function to do something useful. I
> opened a new thread for this.
> 
> The benefit that I see is that rounding errors will not change your
> frame but only the image. I fear that if it is done repeatedly there
> errors could maybe sum up (in some very constructed, special, cases) if
> the frame is changed repeatedly, the image, on the other hand, is always
> set to defined starting conditions (frame completely filled) and
> therefore you are rounding one time maximum. It is of course a rather
> theoretical consideration with almost no practical impact, but that's
> unfortunately the way I think about these things :-)
> 

There will be no rounding errors. As you can see in my notes after the
script, there is no recalculation to return to the prior size. I save
the original value and just reassign it.

Meanwhile, I have reworked the script per your suggestion, and posted on
the wiki:

http://wiki.scribus.net/canvas/Fitting_an_Image_to_its_Frame#fitimage2frame_v2.py

It may be that your mods didn't work because scaleImage() is deprecated,
the new command is setScaleImage().

Greg




More information about the scribus mailing list