Resizing an image with min and max limits

eps11 at mac.com eps11 at mac.com
Sat Mar 5 06:01:16 EST 2011


Thanks for your answer. I have been trying to add limits in this section, but the results are... strange.

I am trying to put a max limit on the width of image "Small" (which is 320x480) by entering : 

if the width of image "Small" < 480 then set the width of image "Small"  to round(sFRAMEWIDTH * (tPercentage / 100))
if the width of image "Small" >= 480 then 

After this latest "then", I have tried everything I know (but I am still a beginner)

"set the width of image "Small" to 480" or "set the maxwidth of image "Small" to 480" works, but block the resizing at 480
"put 100 into tPercentage" blocks the resizing at 480 too

At this stage, I think I would need to find a way to enter a fixed value for either the percentage or the maxwidth, then reset this value so that the resizing could continue, but there might be a better way to do all this.

I am not sure about what to do next.



More information about the use-livecode mailing list