0

I am working on a project where i need to upload photo to canvas but the problem is arising that when user uploading image from iphone, image is automatically getting rotated 90deg.

Is there any way i can check image's orientation using Javascript? and if i can rotate image if its orientation is not Normal(Horizontal)?

Thanks in Advance.

Stefan
  • 4,997
  • 8
  • 26
  • 51
Bhaskar Dabhi
  • 810
  • 1
  • 9
  • 28

1 Answers1

0

The device that takes the picture that it actually has a sensor that can tell orientation.

Using window.orientation we can get orientation either portrait or landscape

Refer

How do I correctly detect orientation change using javascript and Phonegap in IOS?

How to extract image orientation information from image loaded in Canvas

Community
  • 1
  • 1
Sridhar R
  • 19,902
  • 6
  • 37
  • 35