Screen capture on iPad3 is not OK

I am using this code to take a screenshot of the whole screen and save it to temporary directory:

display.save( display.getCurrentStage(), "picture.jpg", system.TemporaryDirectory )  

It works OK using iPhone 4 but on the iPad 3 the captured screenshot is cut-off above and on bottom.

Anyone has tried this ?

Bug ?

Anyone ?

Can you post one of your captured screens?   Also what is your config.lua like?

Sure Rob, thank you for your help.

Here is the config.lua:

application = {     content = {         width = 640,         height = 960,         scale = "letterBox",         fps = 60,              },     }  

ach.jpg

Well 640x960 is the iPhone 3/4/4s screen shape.  iPads are different.  The save is going to make a 640x960 rectangle out of your screen.  If this is working on the iPad, it’s because you’re background is bleeding out of the 640px range and you probably have these items positioned just a little outside that box as well.  You need to have your config.lua support the iPad’s shape.  You can keep the positioning scale the same.  Maybe have your iPad work on a 720x960 scale. 

I know the Ultimate Config.lua blog post is a bit for people to digest, but if you intend to support multiple screen shapes, you need to tell Corona how to support them and that’s what the blog post does.

http://www.coronalabs.com/blog/2012/12/04/the-ultimate-config-lua-file/

You’re going to run into the same problem (just on the sides instead of top/bottom) taking a screen shot on an iPhone 5.

Thank you Rob for your help.

Actually, I found another way that works. Didn’t want to change the config.lua as the game works fine on all devices, only the screen capture was wrong.

Here is what I have done:

        local screenCap = display.captureScreen()         display.save( screenCap, "ach.jpg", system.TemporaryDirectory )         screenCap:removeSelf()  

display.captureScreen() captures the whole screen even on an iPad.

Anyone ?

Can you post one of your captured screens?   Also what is your config.lua like?

Sure Rob, thank you for your help.

Here is the config.lua:

application = {     content = {         width = 640,         height = 960,         scale = "letterBox",         fps = 60,              },     }  

ach.jpg

Well 640x960 is the iPhone 3/4/4s screen shape.  iPads are different.  The save is going to make a 640x960 rectangle out of your screen.  If this is working on the iPad, it’s because you’re background is bleeding out of the 640px range and you probably have these items positioned just a little outside that box as well.  You need to have your config.lua support the iPad’s shape.  You can keep the positioning scale the same.  Maybe have your iPad work on a 720x960 scale. 

I know the Ultimate Config.lua blog post is a bit for people to digest, but if you intend to support multiple screen shapes, you need to tell Corona how to support them and that’s what the blog post does.

http://www.coronalabs.com/blog/2012/12/04/the-ultimate-config-lua-file/

You’re going to run into the same problem (just on the sides instead of top/bottom) taking a screen shot on an iPhone 5.

Thank you Rob for your help.

Actually, I found another way that works. Didn’t want to change the config.lua as the game works fine on all devices, only the screen capture was wrong.

Here is what I have done:

        local screenCap = display.captureScreen()         display.save( screenCap, "ach.jpg", system.TemporaryDirectory )         screenCap:removeSelf()  

display.captureScreen() captures the whole screen even on an iPad.