Obj-C Question: Getting a snapshot of the canvas

Hello,
I’m writing the Obj-C functions for my app today, and I was looking into capturing an image of the OpenGL frame. I can’t use the camera button because pictures don’t work in the runtime. Anyways, I’ve found a few functions already written to capture an OpenGL frame (here and here), but I don’t know how to implement it with Codea’s OpenGL frame because everything is archived into a file, restricting me from seeing the file names.
Any help would be great.
Thanks!

Don’t think I understand what you want to do, but here is a try. :slight_smile:

You can use setContext(image) to write to an image instead of the screen (and display that image if you like). And then write an extension to save the image or facebook it, like in my example here:

https://gist.github.com/tnlogy/5371725

@tnlogy - I assumed it would be more efficient to do it in C, but this’ll do. Thanks!