Page 1 of 1
PickPhoto into database
Posted: Thu Jul 28, 2011 11:59 pm
by SteveHanlan
If I use mobilePickPhoto "library" to get a pointer to an image in the iphone/ipad library (or indeed take a photo with the camera), how do I get to the actual image such that I can save, (a thumbnail of it), out to my documents folder?
I get as far as "the name of the last image" which yield the stack reference to it, but where is the actual image?
thanks
Steve
Re: PickPhoto into database
Posted: Fri Jul 29, 2011 2:48 am
by Jellicle
Did you read the release notes? For the photo picker command, it says: "...a new image object will be created on the current card of the default stack..."
So the image is on the current card.
Gerry
Re: PickPhoto into database
Posted: Fri Jul 29, 2011 3:01 am
by SteveHanlan
Yes I did!
But, I don't get how to save that image out to a file in the 'documents' folder.
Steve
Re: PickPhoto into database
Posted: Fri Jul 29, 2011 3:31 am
by Jellicle
SteveHanlan wrote:I don't get how to save that image out to a file in the 'documents' folder.
This works on the desktop - I think it'll work on iOS:
Code: Select all
set the defaultFolder to specialFolderPath("Documents")
put image "test" into URL (("binfile:"&test&".jpg"))
Just substitute whatever your image name or id is, and whatever you want to call the file.
Gerry
Re: PickPhoto into database
Posted: Fri Jul 29, 2011 11:36 am
by Klaus
Hi guys,
I heard that some user have problems setting the default folder on iOS.
So it is a better idea to supply the complete filepath:
...
put image "test" into URL ("binfile:" & specialfolderpath("documents") & "/name of image here.jpg")
...
Best
Klaus
Re: PickPhoto into database
Posted: Fri Jul 29, 2011 4:50 pm
by SteveHanlan
Gerry - That worked. It was the 'binfile' that I missed - Doh!
Klaus - Good advice
Thanks to all
Steve