Re: Resizing an image with min and max limits

2011-03-05 Thread J. Landman Gay
On 3/5/11 5:01 AM, ep...@mac.com wrote: 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

Re: Resizing an image with min and max limits

2011-03-05 Thread Mark Schonewille
Hi Eric, You might find this function useful: function rescale theImgWidth,theImgHeight,theCdWidth,theCdHeight if theCdWidth/theImgWidth < theCdHeight/theImgHeight then put theCdWidth / theImgWidth into myRatio else put theCdHeight / theImgHeight into myRatio end if put theImgWidt

Re: Resizing an image with min and max limits

2011-03-05 Thread eps11
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

Re: Resizing an image with min and max limits

2011-03-05 Thread Harald Müller
Hi Eric, the function "resizeGraphic" in the demo will resize the graphic, here you could add your image limits. Best regards, Harald. | Harald Müller (app.etcpp.de) | Theodor-Körner-Straße 4, D-97072 Würzburg | Telefon 0931-8049170 Am 05.03.2011 um 08:58 schrieb Eric Peyron: > Hi all, >

Resizing an image with min and max limits

2011-03-04 Thread Eric Peyron
Hi all, I have created an app with multi-touch resizing of images using the "How do I implement a multi-touch pinch motion?" lesson, but I can't seem to set limits to the resizing. What lines could I add to the code of the sample stack from this lesson to have a min size and and a max size for