Taking a screenshot of part of the screen?

Hi All, does anyone have any experience with triggering a screenshot of a specific rectangular region of the screen, or does it need to be a screenshot of the entire screen only? Anyone seen any code examples of either? Thanks in advance for any insight/suggestions!

you can use saveImage() function for any part on the screen you want to save.

// EDIT: see Image IO example project for more

Awesome! Thanks!

I checked out the saveImage() function and if I’m understanding it correctly, it saves the image in question into the “Documents” area of Codea? I’m interested in saving an image into the camera roll on the user’s device.

Maybe I start with saveImage() to define the image, then there’s a way to save it to the user’s camera roll?

I dont think there is any way to save to your camera roll, but you never know, someone may have a hack or maybe Simeon will tell you.

You can save to your dropbox, and from the dropbox app you can save to your camera roll (It’s a bit of a hassle, but if you really need it…)

Following AndrewStacey recommendation i filed this in the issue tracker.
I also added ‘save text to clipboard’ wich will be usefulnto develop utilities

save text to clipboard, and read text from clipboard, are very near the top of my list. Along with GPS. (output to clipboard was already on the issue tracker – #191)

And I’m stopping now before I overrun the topic with all my long-expressed gimme gimmes.

So it sounds like right now we can’t create an app in Codea that saves a camera image or a saveImage() (screenshot) to the user’s camera roll on their device.

OK – yes, that functionality would definitely be useful. Thanks for the feedback, and thanks for the great coding platform, I love it.

So, if we can’t save to the user’s camera roll, can we at least put a saveImage() into an email? I know we can initiate an email and supply some text, but how about emailing the image as well? And/or SMS/text? Thanks for any insight.

Hello @beyond. If you can live with a full size picture, you can still save it with the native screenshot copy (home+off) button… This is not elegant, but the functionnality is there.

Yep, thanks, Jmv! I certainly can do that myself – I’m creating an app that has a photo component, and I want to enable users to be able to potentially take a picture, manipulate it, then save it to their photos, or post it to Facebook, etc, a la instagram and the like; so I want to enable that functionality within the app itself, rather than making them take their own screenshot, etc. Thanks again for the reply!

Anyone know how to put a saveImage() into an email or text message? I can get the text into an email thanks to another thread here, but don’t know how to get an image in the email. And as far as text messages go, I’m clueless. Thanks for any info/insight anyone has!