Accessing JPEG EXIF rotation data in JavaScript on the client side

前端 未结 8 1551
臣服心动
臣服心动 2020-11-22 13:53

I\'d like to rotate photos based on their original rotation, as set by the camera in JPEG EXIF image data. The trick is that all this should happen in the browser, using Jav

8条回答
  •  执笔经年
    2020-11-22 14:44

    Firefox 26 supports image-orientation: from-image: images are displayed portrait or landscape, depending on EXIF data. (See sethfowler.org/blog/2013/09/13/new-in-firefox-26-css-image-orientation.)

    There is also a bug to implement this in Chrome.

    Beware that this property is only supported by Firefox and is likely to be deprecated.

提交回复
热议问题