简体   繁体   中英

How to set EXIF Orientation value to 1 in HEIF (.heic) image formats using Javascript and return the result as a blob?

I have a blob created from an HEIF image which probably contains EXIF Orientation value. I'm using heif2any.js to convert it to JPEG image but I want to prevent double-rotation problem stated in this answer: https://stackoverflow.com/a/28596303/9249141 (the library suggested to be used does not support HEIF format).

So I simply need a JS function which takes a blob created from an HEIF image, remove its EXIF Orientation tag OR set EXIF Orientation value to 1, and then return the result as a new blob.

You don't need to worry about it since heic2any discards metadata in the conversion. That's one of the downsides of the utility, but an upside for you!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM