Accessing JPEG EXIF rotation data in JavaScript on the client side

前端 未结 8 1546
臣服心动
臣服心动 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:31

    https://github.com/blueimp/JavaScript-Load-Image is a modern javascript library that can not only extract the exif orientation flag - it can also correctly mirror/rotate JPEG images on the client side.

    I just solved the same problem with this library: JS Client-Side Exif Orientation: Rotate and Mirror JPEG Images

提交回复
热议问题