Picture is saved rotated
Posted: Wed Feb 08, 2017 11:08 pm
I have the attached stack that takes a picture using the celular camera, without human intervention, and saves it to the device album.
Everything works OK with the device in Portrait mode, but when the mobile is in landscape the picture gets saved rotated by 90 degrees and I haven't been able to fix it, despite the hints I got on related posts ...
This is the code
Looking forward to get help from the gurus...
Everything works OK with the device in Portrait mode, but when the mobile is in landscape the picture gets saved rotated by 90 degrees and I haven't been able to fix it, despite the hints I got on related posts ...

This is the code
Code: Select all
on mouseUp
-- set the virtual camera
cameraControlCreate"myFirstCamera"
cameraControlSet "myFirstCamera", "device", "rear"
cameraControlSet "myFirstCamera", "rect", the rect of image "Img1"
cameraControlSet "myFirstCamera", "visible", true
-- take the picture and show it
cameraControlDo "myFirstCamera", "takePicture"
put the result into image "Img1"
cameraControlSet "myFirstCamera", "visible", false
-- save the picture
put the long ID of the last image into tImageID
mobileExportImageToAlbum tImageID
end mouseUp