Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

CaptureToFile
Started by chadscc Oct 24 2009 12:35 AM

- - - - -
4 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

chadscc

[GLOBAL: userInfoPane.html]
chadscc
  • Enthusiast

  • 44 posts
  • Guests

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
uid: 3396 topic_id: 191 reply_id: 300191


[TOPIC: post.html]
#2

carlos m. icaza

[GLOBAL: userInfoPane.html]
carlos m. icaza
  • Corona Geek

  • 2,992 posts
  • Alumni

looking at it now
uid: 24 topic_id: 191 reply_id: 222


[TOPIC: post.html]
#3

carlos m. icaza

[GLOBAL: userInfoPane.html]
carlos m. icaza
  • Corona Geek

  • 2,992 posts
  • Alumni

can you send me code ... it works for me on iphone.... :-|
uid: 24 topic_id: 191 reply_id: 223


[TOPIC: post.html]
#4

carlos m. icaza

[GLOBAL: userInfoPane.html]
carlos m. icaza
  • Corona Geek

  • 2,992 posts
  • Alumni

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
uid: 24 topic_id: 191 reply_id: 224


[TOPIC: post.html]
#5

chadscc

[GLOBAL: userInfoPane.html]
chadscc
  • Enthusiast

  • 44 posts
  • Guests

Okay...got it working now. Thanks!
uid: 3396 topic_id: 191 reply_id: 226



[topic_controls]
[/topic_controls]