How to save an image to camera roll through LUA code?

I want to make an image editor app, but don’t know how to save images to iPad camera roll…
I searched the api tutorial but found nothing…

there is no such function. I did bring that one up a few times but after years I surrendered :confused:

@DYC There’s no way to directly save an image to the camera roll, but you can manually move images from to camera roll to Codea’s Dropbox folder. From there you can do whatever editing you want on it. When you’re done, you can manually move the image back to the camera roll.

… but how can I do that if I want to build it in Xcode. I want to make it into a stand-alone app and edit images with it. So it is not possible?..

It’s my first time using Codea. It’s the first problem I run into. Saving an image to camera roll looks very simple but codea just cannot do that… I don’t understand why…

@DYC You didn’t mention XCode at the start. Since other apps can reference the camera roll, then there must be a way to do it. I don’t do anything with XCode so I can’t give you an answer. You’ll have to wait for @Simeon or @John or someone who uses XCode for an answer.

@dave1707 ok… thanks anyway

@tnlogy wrote an addon that can save an image to the camera roll. It also does some other things (such as face recognition and integration with facebook) that you may or may not want, but if not then they can be removed.

The code is linked in this discussion.

I can attest to the fact that it works as my recent app (Celtic Knots) uses this code (or, rather, a subset of this code) to save images to the camera roll.

Thanks I will have a try