[scribus] Adjust frame 2 image api?
Mark Heieis
mheieis at alois.ca
Sat Nov 10 16:20:57 UTC 2012
Greg,
Thanks for the tip. I was thinking about this kind of approach as well,
since I already manage the autorotate to correct for image orientation.
I would just add the frame adjustment at the same time.
Cheers
On 2012-11-09 17:06, Gregory Pittman wrote:
> On 11/09/2012 12:14 PM, Mark Heieis wrote:
>> Hello
>>
>> Is there a scripting api that mimics the "Adjusts Frame to Image"
>> capability in the UI along the lines of "setScaleImageToFrame()"? So
>> far, I haven't found that functionality in the API documentation. So
>> wondering whether I missed it, it's undocumented or it doesn't exist.
>>
> If you look at the versions of Infobox.py that use PIL (Python imaging
> library), this is a trivial thing to accomplish.
>
> Using the Image module:
>
> im = Image.open(imageload)
> xsize, ysize = im.size
>
> and once you have xsize, ysize you use these to size the frame to the
> image, or use some fraction of each and setScaleImageToFrame().
>
> Greg
>
> ___
> Scribus Mailing List: scribus at lists.scribus.net
> Edit your options or unsubscribe:
> http://lists.scribus.net/mailman/listinfo/scribus
> See also:
> http://wiki.scribus.net
> http://forums.scribus.net
More information about the scribus
mailing list