Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

SaveImage()

edited November 2011 in Suggestions Posts: 622

Saveimage(x,y,w,d) saves the pixels specified by the rect to saved images to the default saved images on the IPad in (whichever is easiest) format under the name (whatever the default iOS name is to prevent naming collisions if any)

Saveimage(x,y,w,d,r,g,b) adds transparency color

Recommend internal counter to limit use to once a second to prevent malious code

https://bitbucket.org/TwoLivesLeft/codea/issue/30/saveimage

Comments

  • SimeonSimeon Admin Mod
    Posts: 5,782

    Thanks for posting it as an issue. It's a good feature request and also leans into the territory of making your own project icons, which is something I'm still thinking about.

    Spamming the call is a problem, as you mention, especially if a naive user accidentally puts it into the draw() function.

    I'm thinking this sort of functionality might not even be an API function, but instead we could introduce a "screenshot" button into the render view. Though that has the disadvantage of not being able to take full-screen screenshots.

  • BortelsBortels Mod
    Posts: 1,557

    Being able to grab a chunk of the screen is handy - if you want to allow it to be saved off to photos, just require a name (can it even do that? I don't know). I'm far less excited about saving a screenshot (we can already do that!) than I am about drawing images, perhaps off-screen, then blitting them around.

  • SimeonSimeon Admin Mod
    Posts: 5,782

    Drawing to images is already in the current development build. There's a really nice image class implemented by Dylan. We just need to wait for Apple to get 1.1.2 through so we can submit the next version already :)

Sign In or Register to comment.