Zooming in on an image

Alejandro Tejada capellan2000 at yahoo.com
Thu May 26 14:59:49 EDT 2005

on Wed, 25 May 2005 
Ben Fisher wrote:

> I'm wondering what is the most efficient way to
> resize a large image.

Hi Ben,

Look at this message from the archives:

Magnifier (script!)
Sannyasin Sivakatirswami 
Mon Jul 21 2003

And, this is actually the proper way to do this, 
a bit more "esoteric" but the resize occurs  
only once instead of twice... a tad faster.

local tSizeChange

on mouseup
   if optionkey()="Down" then
     put (-10) into tSizeChange
     exit mouseup
   end if
   put (+10) into tSizeChange
end mouseup

on changeSize
put (the height of the target/the width of the target)
into tRatio
put the rect of the target into tImageRect
put (item 3 of tImageRect+tSizeChange) into item 3 of
put (((item 3 of tImageRect-item 1 of tImageRect)*
tRatio)+item 2 of tImageRect) into item 4 of
set the rect of the target to tImageRect
end changeSize

Visit my site:

Do you Yahoo!? 
Yahoo! Small Business - Try our new Resources site

More information about the Use-livecode mailing list