CaptureToFile

CaptureToFile Sample Code doesn’t seem to work. I’ve even compiled it and put it on my iPhone. I’ve tried writing my own POC app as well that captures and saves a screenshot locally.

The code:

local baseDir = system.DocumentsDirectory
display.save( display.currentStage, “ScreenShot.jpg”, baseDir )

doesn’t seem to do anything on the iPhone. It definitely doesn’t save anything locally.
Thoughts? Anything I could be doing wrong?
Thanks!

Chad [import]uid: 3396 topic_id: 191 reply_id: 300191[/import]

looking at it now [import]uid: 24 topic_id: 191 reply_id: 222[/import]

can you send me code … it works for me on iphone… :expressionless: [import]uid: 24 topic_id: 191 reply_id: 223[/import]

make sure that you have drawn into the display.currentStage
local bkgd = display.newRect( 0, 0, display.stageWidth, display.stageHeight )
bkgd:setFillColor( 128, 0, 0 )

display.currentStage will have the rectangle above in its display list and when saving it will save the render of display.currentStage …

carlos [import]uid: 24 topic_id: 191 reply_id: 224[/import]

Okay…got it working now. Thanks! [import]uid: 3396 topic_id: 191 reply_id: 226[/import]