Is there any easy way to allow user access to photo library?

Does anyone know of a simple way to allow users to choose an image from their photo library/camera roll? I’ve read a lot of old posts on the subject, most from over 4 years ago, and I was just wondering if anything has changed in Codea since to allow easier access to the photo picker. If not, which seems very likely, what is the current best known method to allow a user to personally select a photo for use in my app?

@Circuit Nope! Sorry. Codea doesn’t have a feature like this, tho it would be cool if they implemented it. The only way to do it so to type the code in objective c once you export it to xCode

Well, that’s exactly as I had thought from what I have read. Unfortunately, seeing as my programming skills are kind of lacking outside of Codea, that probably won’t be viable option for me. I was really hoping it was possible by now : (

@Circuit If you could put your image on a public photo site, they could get the image with code like this.

displayMode(FULLSCREEN)

function setup()
    getImg()
end

function draw()
    background(40, 40, 50)
    if img~=nil then
        sprite(img,WIDTH/2,HEIGHT/2,700)
    else
        fill(255)
        text("Loading image",WIDTH/2,HEIGHT/2)
    end
end

function getImg()
    http.request('https://dl.dropboxusercontent.com/s/3149mj9xjx1w71e/Costa%20Rican%20Frog.jpg',gotImage)
end

function gotImage(image,status,header)
    img=image
end

@dave1707 , thanks for the creative thinking. That works great for personal use, but I feel it may be kinda weird to request a user post their file online and then input a link into my app to allow their own images to be used. Is there any possible way to use the image copy/paste function, or does that still have the same limitations? Thanks again

@Circuit That’s what I was just about to recommend. You can tell the user to copy the image onto their pasteboard, then when retrieving it:

function retrieve()
     local img=pasteboard.image()
     assert(img~=nil,"The user doesn't have anything on their pasteboard!")
     return img
end

@CamelCoder Thanks, that should work just fine for now.

Just thought I’d flag up this again, would love a way to pick an image out of the library at runtime (so, I could add a drawing tool over a photo, or other) be great if I could save it back to the library too.

@pjholden I’ve logged this as a feature request, thanks for bringing it back up!