dump newbie image questiosn

Ryno Swart swartart at iafrica.com
Mon Jun 6 17:18:33 EDT 2005


Jacqueline, This is one of those simple, elegant, inspired moments when 
scripting sings! Nice.

> No, I wasn't joking. I'm not even sure I understand the problem because
> I've never seen it. I always scale images by calculating the desired
> dimensions and setting the image to that size. For example, if I want 
> an
> image to display at 1/3 its natural size, I do this:
>
> set the width of img 1 to round((the formattedwidth of img 1) * .3)
> set the height of img 1 to round((the formattedheight of img 1) * .3)
>
> This works whether the lockloc of the image is true or false. However, 
> I
>   leave it set to true because otherwise it will reset back to normal
> size if I leave the card.
>
> I see no distortion when I do this. Technically, you don't even need to
> use the "round" function because the engine will adjust to the nearest
> pixel automatically.

Ryno.



More information about the use-livecode mailing list