Photo Processor/Manager

Ken Ray kray at sonsothunder.com
Sun Nov 24 22:26:01 EST 2002


> 1) GET RECT OF IMAGE IN ADVANCE:
> Can we get the rect of an image on disk, or the imagedata in variable
> before display?  I can't find any "imagedata properties" as such.  I
> need to retain the 2048 X 1536 pixel aspect ratio and data in the
> imagedata of high res images coming in off camera, but constrain that
> to a smaller size for display. So that the image will actually fit
> reasonably in a stack window area of about 4 X 5 inches maximum. Also
> one won't know in advance the orientation which could be vertical or
> horizontal.  If we can get the rect before display we can then script
> the image object size accordingly, lock it and then assign the file ref
> to it before display. Of course I could display it first, get the rect
> and then do it... but the idea is to make this as fast as possible.

You can use an offscreen image object that is invisible and whose lockLoc
property is false. Import the image and then get its width and height... OR
you can use an image object whose lockLoc property is TRUE, and then get the
'formattedWidth' and 'formattedHeight' of the image (which will return its
original width and height).

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/




More information about the use-livecode mailing list