JavaH
JavaH

Reputation: 427

Need to get capturing image current orientation

Hi In my android phonegap app,when i capture the image in portrait mode then image is rotated when retrieving the image.

Here is my code to capture the image:

navigator.device.capture.captureImage(captureSuccess, captureError, {limit: 1});

If i set correctOrientation as true nothing difference.

If i use the below code then image is stored in correct orientation but saved in cache.Is there any solution to save in DCIM\Camera path?

navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50,
            destinationType: navigator.camera.DestinationType.FILE_URI, 
            correctOrientation: true });

Please help me.Thanks in Advance

Upvotes: 3

Views: 1139

Answers (1)

A. Magalhães
A. Magalhães

Reputation: 1516

To capture photo you need to use getPicture method and to stored photo on DCIM\Camera path you need to turn true saveToPhotoAlbum parameter.

navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50,
        destinationType: navigator.camera.DestinationType.FILE_URI, 
        saveToPhotoAlbum: true,
        correctOrientation: true });

Upvotes: 1

Related Questions