I have been experimenting with this for awhile now and this is what I have found:
I have a picture that I load in. It has a resolution of 1200x1800.
I add it to a display group because I overlay some things on it.
I then save it with this:
local photoGroup = display.newGroup() local photo = display.newImage("original.jpg", system.DocumentsDirectory, display.contentCenterX, display.contentCenterY, true) photoGroup:insert(photo) -- Add other display objects because I want some things overlayed on it (not shown here) -- Save it display.save(photoGroup, { filename="myPic.jpg", baseDir=system.TemporaryDirectory, isFullResolution=true, backgroundColor={0, 0, 0, 0}, jpegQuality=1 })
Results:
Column1 = saved photo resolution
Column2 = config.lua width and height
Column3 = Hardware device width and height
563x750 @ 640x960 on 640x960
406x540 @ 320x480 on 640x960
203x270 @ 320x480 on 320x480
282x375 @ 640x960 on 320x480
If I don’t add the photo to a display group and just save it back out after I load it in, then I get different results:
1200x1600 @ 640x960 on 640x960
2400x3200 @ 320x480 on 640x960
1200x1600 @ 320x480 on 320x480
600x800 @ 640x960 on 320x480
As you can see it multiplies the resolution by the scale factor used by corona’s dynamic scaling.
This behavior seems pretty erratic.