Wrong Image orientation


#1

Hi,
I have an image which was taking in portrait (when i open it, it is in portrait mode) but when I display image using src its displayed as landscape
any idea what am I doing wrong ?


#2

I had a similar problem (outside of an Ionic app though) whereby taking a photo would result in random orientation. turns out it’s not random - check out https://github.com/exif-js/exif-js which has tools to correct the orientation of images when stored in memory before writing to device / uploading to a server.


#3

yes your right its exif causing the issue.
anyways I was able to resolve with canvas.


#4

Hi All

I have a similar problem, I get picture with camera plugin, then I move the pic in a persistent storage with File.moveto(), but I see the image rotated in img tag.

Can you share your code that figures it!

Than you


#5

I can’t figure out the solution presented. could you make it simpler? what is canvas?


#6

Hi,

Camera.getPicture() accepts a parameter called “correctOrientation”. If set to true, the resulting image will have the correct orientation instead of storing orientation in EXIF metadata. I just tried it on Android.


#7

Help me to resolve with canvas . Im drawing image using canvs but getting rotated on some devices