fengyuanchen / cropper

⚠️ [Deprecated] No longer maintained, please use https://github.com/fengyuanchen/jquery-cropper
MIT License
7.75k stars 1.74k forks source link

[Bug] Rotate bug with photo taken in portrait on iPhone #915

Closed hungdo89 closed 7 years ago

hungdo89 commented 7 years ago

OS: iOS version 8.1.2 ~ 9.3.2 (and I think below iOS 10 will has the same bug) Browser: Safari

When I take a photo in portrait and rotate it, the cropper canvas will display wrong. At first I think there are something wrong with my configs so I come to your site and try. Well, it's the same. Please check below image. img_2566

I have spent 2 days trying to fix this bug but no luck.

Anderson-Vasques commented 7 years ago

No sure if it can help you @hungdo89 https://github.com/fengyuanchen/cropper#checkorientation

PS: I am not an expert. I just started using this nice plugin :P

hungdo89 commented 7 years ago

@Anderson-Vasques I don't change any option so it will be default value. As you can see, checkOrientation will be true and the bug is still there.

fengyuanchen commented 7 years ago

The checkOrientation option requires Typed Array support (iOS Safari 9.3+)!

hungdo89 commented 7 years ago

@fengyuanchen Don't you see that I have mentioned iOS 9.3.2 in my first post?

fengyuanchen commented 7 years ago

@hungdo89 I said iOS Safari, not iOS. Are you sure they are the same?

hungdo89 commented 7 years ago

@fengyuanchen http://caniuse.com/#feat=typedarrays as mentioned in this link, Typed Array is avaiable in Safari & Chrome for iOS 9.3+, not iOS Safari. Please hover to see more detail.

fengyuanchen commented 7 years ago

@hungdo89 Can you provide the window.navigator.userAgent of your iOS Safari?

hungdo89 commented 7 years ago

img_2577 @fengyuanchen iOS 9.3.5, the bug still occurred

fengyuanchen commented 7 years ago

I saw Safari/601.1, which is nearly the same as Safari 9.0.

You can detect Typed Array support in your iPhone quickly with this way: alert(window.ArrayBuffer)