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:
<http://lists.runrev.com/pipermail/use-revolution/2003-July/019491.html>

Magnifier (script!)
By
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
     changeSize
     exit mouseup
   end if
   put (+10) into tSizeChange
   changeSize
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
tImageRect
put (((item 3 of tImageRect-item 1 of tImageRect)*
tRatio)+item 2 of tImageRect) into item 4 of
tImageRect
set the rect of the target to tImageRect
end changeSize

Visit my site:
http://www.geocities.com/capellan2000/


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new Resources site
http://smallbusiness.yahoo.com/resources/


More information about the use-livecode mailing list