Accessing JPEG EXIF rotation data in JavaScript on the client side

前端 未结 8 1548
臣服心动
臣服心动 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条回答
  •  -上瘾入骨i
    2020-11-22 14:35

    Check out a module I've written (you can use it in browser) which converts exif orientation to CSS transform: https://github.com/Sobesednik/exif2css

    There is also this node program to generate JPEG fixtures with all orientations: https://github.com/Sobesednik/generate-exif-fixtures

提交回复
热议问题