object:scale() particularities

Hi,

 I am trying to build a photo app,and the only way I found of scalling my images is using the scale() function in corona.

 I want to export my image in the  512x512  resolution,but I don’t know how to calculate the exact params that I have to insert in the scale function.

e.g.  for 512x512 image then image:scale(n,m) 

n,m are numbers/params

Thank you.

Here is a little trick i would do, you basicially want to export 2 types of images made by your phone ? Vertical and horizontal one right?

so here would be sample code :

local myImage = display.newImage( “image.png” )

local a = myImage.width

local b = myImage.height

if a > b then

— img is vertical

do your math here as you got both values now

else

— img is horizontal

do your math here as you got both values now

end

Here is a little trick i would do, you basicially want to export 2 types of images made by your phone ? Vertical and horizontal one right?

so here would be sample code :

local myImage = display.newImage( “image.png” )

local a = myImage.width

local b = myImage.height

if a > b then

— img is vertical

do your math here as you got both values now

else

— img is horizontal

do your math here as you got both values now

end