Page 1 of 1

Cannot Rotate Image

Posted: Mon Jul 23, 2018 8:28 pm
by Googie85
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.

Re: Cannot Rotate Image

Posted: Mon Jul 23, 2018 9:51 pm
by dunbarx
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

Re: Cannot Rotate Image

Posted: Wed Aug 29, 2018 11:29 pm
by MaxV
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
...