Martin Ongtangco
Martin Ongtangco

Reputation: 23535

How do you auto-rotate a captured image using Phonegap?

I'm working on an example I got from Phonegap on capturing Images using the built in device camera. If I rotate the device, the saved image stays in that orientation.

I know in javascript, I can manipulate images-- and Phonegap has a G-Calibration sensor api I can use.... but Is there a straight forward way through Phonegap to auto-detect orientation?

Upvotes: 3

Views: 626

Answers (1)

BigBalli
BigBalli

Reputation: 817

the problem is that the exif data (which contains the orientation among other things) is not passed by the plugin. For this reason you need to try to understand which "way" the picture was taken. Worst case, allow the user to rotate it.

Upvotes: 1

Related Questions