We're using FileReader
to get an image, from a photo taken on an iPhone, into the browser. We then use drawImage()
to draw that image onto a canvas
. The problem is that photos taken on an iPhone display rotated on the page. We can't reproduce this on any Android devices.
We can rotate the image on the canvas
easily enough but how can we determine the required rotation? We tried some EXIF-reading libraries for JavaScript (exif.js) but were unable to successfully read the orientation.