I’m fairly new to Corona as well, and I’ve been having issues with the camera function and display.save. Besides the poor resolution, I can’t seem to get rid of the scaling issues.
ymmtny’s scaling technique doesn’t seem to be working for me. Whenever I scale things the image that gets displayed becomes a tiny section of an extremely zoomed in image.
Without any scaling, display.save seems to work (with poor resolution) on an iPhone 3G, but on the 4G, it just displays the top left quarter of the screen. This must be due to the 0.5 scaling on the high resolution screen. Scaling can also be effected by the code in your config.lua file… lots of people use “letterbox”, “zoomStretch” or “zoomEven” to adjust to the varying android screen sizes.
for iPhone3G the scale is 1,1
for iPhone4G the scale is 0.5, 0.5
for iPad the scale is 0.46875, 0.46875
Hypothetically, it would be possible to make the necessary scaling adjustments for each device separately. But my code above still doesn’t change anything when using the iPhone 4G device.
I hope this stuff helps somebody.
I do know that you can check to see scaling your device is using by entering these functions:
[lua] local scaleX, scaleY = display.contentScaleX, display.contentScaleY
print("scaleX, scaleY: ", scaleX, scaleY)
if scaleX ==.5 and scaleY == .5 then
print(“this is displaying on a retina display… iPhone 4G”)
t.xScale = display.viewableContentWidth/t.width
t.yScale = display.viewableContentHeight/t.height
end
–centering image
t.x = display.viewableContentWidth/2
t.y = display.viewableContentHeight/2
[import]uid: 12578 topic_id: 5943 reply_id: 22826[/import]