dump newbie image questiosn

Chipp Walters chipp at chipp.com
Mon Jun 6 16:07:51 EDT 2005


Alex and Jon,

See the function I posted. It's really fast and invisible to the user, 
and will return the image size in pixels BEFORE you import it into your 
stack (or set the filename). I use it for ImageGadget.

best,
Chipp

Alex Tweedly wrote:
> Jon wrote:
> 
>> This is great if you know in advance that there is enough room to 
>> display the image in this way, at this particular scale.  What I 
>> wanted was something that automatically displayed the image at the 
>> largest resolution possible in "the available space".  That's where 
>> the confusion comes in: I need to store the "available space" 
>> somewhere in the Image object if I am to perform the computations 
>> properly.  Maybe it is just that simple, at least for me.
> 
> 
> I did that by putting in a graphic "theFrame" which was set to the 
> maximum size available for the image. In the Geometry manager, I set the 
> graphic up to stretch to fill the space when the user resized the stack 
> window (and ignored the image object).  And then simply calculated the 
> sizes for the image to fit inside the graphic "theFrame".
> 
> You could stick it in a customProperty of the image - but then you need 
> to figure out stack resizing - easy if you roll your own resizing code, 
> but not so easy if you are using the Geometry Manager.
> (btw - some day I may actually put a pretty frame into that graphic to 
> frame the  photo - but I'll probably never get around to that).
> 
> 



More information about the use-livecode mailing list