goker-dev / canvasResize

Javascript Canvas Resize Plugin. It can work both with jQuery and Zepto. It's compatible with iOS6 and Android 2.3+
http://gokercebeci.com/dev/canvasresize
Other
377 stars 87 forks source link

Plugin Quit Rotating In 2020 #31

Closed wsuser06 closed 2 years ago

wsuser06 commented 2 years ago

In April 2020, chrome and other modern browsers released a feature to enable image-orientation. Basically what this does is uses the photo's exif orientation, when present in an image, and orient the image on the html canvas to it’s correct rotation, therefore the function to rotate is rendered useless (because this browser feature is drawing the image canvas on its terms).

wsuser06 commented 2 years ago

I passed this hard coded value: var orientation = 1; In the rotate and transformCoordinate functions. This allows the rotation function to be bypassed, which then lets the browser do its image rotating on the canvas.