Hi Guys!
I have the following code and I cant get it to rotate and save a camera photo to a file:
on mouseDown
put the field "Time" into timevar
set the defaultFolder to "/mnt/sdcard/"
create folder ("Archery Stats")
set the defaultFolder to "/mnt/sdcard/Archery Stats/"
create folder ("/mnt/sdcard/Archery Stats/"&timevar)
put the long time into dae
put "binfile:/mnt/sdcard/Archery Stats/"&timevar&"/"&dae&".jpg" into temppath
mobilePickPhoto "front camera", 250,600
put the last image into URL temppath
put URL temppath into image "temp"
set the angle of img "temp" to 90
export img "temp" to file temppath as JPEG
end mouseDown
Any Help Would Be Appreciated!
Googie.
Cannot Rotate Image
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Cannot Rotate Image
Hi.
Are there two separate problems here? Is there a valid image when you "mobilepickPhoto"?
If so, does the image not rotate?
If so, then does the image not get "put", or does it not "export"?
Craig Newman
Are there two separate problems here? Is there a valid image when you "mobilepickPhoto"?
If so, does the image not rotate?
If so, then does the image not get "put", or does it not "export"?
Craig Newman
Re: Cannot Rotate Image
Just use this:
Code: Select all
...
set the angle of img "temp" to 90
set the imagedata of image "temp" to the imagedata of image "temp"
export img "temp" to file temppath as JPEG
...
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w