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