I THINK I understand the nature of the "sandbox". But does that extend to the "Camera Roll"?
1) I need to be able to take a picture of a student/athlete and save it SOMEWHERE, keeping track of it's name and location.
2) I need to be able to open a card and display the student's picture.
Here are my questions:
A) Can I save a picture anywhere else but the camera roll? How? (And am I able to know the name of the picture that is saved?)
B) Once a picture is saved to a folder (and I have kept track of it's name and location), can I use the name of the picture and display it again on a different card? How?
Thank you all in advance.
Jack Rarick
Coach's Video Assistant
Saving/Opening Pictures
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Saving/Opening Pictures
Hi Jack,
You can save a picture in the documents folder of your app. If you have some kind of a database in you app (this could be a simple text file even) then you can just store the file name with the student name/id.
One way to save a picture is to export an image object to a variable, e.g.
Kind regards,
Mark
You can save a picture in the documents folder of your app. If you have some kind of a database in you app (this could be a simple text file even) then you can just store the file name with the student name/id.
One way to save a picture is to export an image object to a variable, e.g.
Code: Select all
export img x to myVar as PNG
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Saving/Opening Pictures
hi, i have a similar question: if i make a stack as a sort of photo album, how i can let the user choose an image and copy it to the camera roll? i guess i have to use some ios command to do this
thanks in advance
thanks in advance
how many hypercardist are needed to change a light bulb? one to actually do it while at least a dozen more are finding out a slightly different way to do it
proudly hypertalking since 1989
proudly hypertalking since 1989
Re: Saving/Opening Pictures
Hi tzenobite,
from the iOS Release Notes under the Help Menu:
Kind regards
Bernd
from the iOS Release Notes under the Help Menu:
You may want to have a look at those iOS Release Notes.Saving photos to the users album
You can save an image to the user's photo album by using:
iphoneExportImageToAlbum imageTextOrControl Where imageTextOrControl is one of:
• the binary data of an image (the 'text') in PNG, GIF or JPEG format
• a long id of an image object containing an image in PNG, GIF or JPEG format The command will return empty in the result if exporting succeeded. Otherwise it will return one
of:
• could not find image – the image object could not be found • not an image – the object was not an image • not a supported format – the image object in not of PNG, GIF or JPEG format • export failed – an error occurred while trying to save the image to the album
If the device has a camera, the image is saved to the Camera Roll, other wise it is saved to the Saved Photos album.
Note: When running in the simulator, there needs to be at least one image in the photo album for exporting to succeed. You can add images to the photo album in a simulator by dragging an image on the simulator window, and saving the image to album from Safari (click and hold on the image to bring up an alert with the option).
Kind regards
Bernd
Re: Saving/Opening Pictures
many thanks!
how many hypercardist are needed to change a light bulb? one to actually do it while at least a dozen more are finding out a slightly different way to do it
proudly hypertalking since 1989
proudly hypertalking since 1989