Image orientation when retrieving original image with readAsDataURL
All the portrait images coming from my camera and iPhone devices have this issue. Only the portrait photos saved with adobe photoshop seem to not have this issue.
Here is one of the example system that I’ve found in the internet. My code is very similar:
Notice when uploading this photo that it’s loaded in landscape mode: http://www.rafaelsanches.com/IMG_3786.JPG
Notice that the image actually displays in landscape when using the browser to download it. When you save it to the disk and open with the finder it is previewed in portrait. (Probably the finder is clever to use the exif info)
Using exif.js I have discovered that the example image has an Orientation=8. The photos that are saved using photoshop have an Orientation=1.
Now, how do you guys suggest that I go about this? Should I plot it in a canvas and rotate depending on the exif information? Someone has a good tutorial about this? Have anyone faced this problem before?