如何使用JavaScript将EXIF方向值设置为HEIF(HEIC)图像格式中的1并将结果返回为斑点?
我有一个由HEIF映像创建的斑点,该斑点可能包含EXIF方向值。我正在使用heif2any.js将其转换为jpeg映像,但我想预防此答案中指出的双重旋转问题: https:/ /stackoverflow.com/a/28596303/9249141 (建议使用的库不支持HEIF格式)。
因此,我只需要一个JS函数,该功能从HEIF映像中创建一个斑点,删除其EXIF方向标签或设置EXIF方向值为1,然后将结果作为新斑点返回。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不必担心它,因为Heic2y在转换中丢弃了元数据。这是公用事业公司的缺点之一,但对您来说是一个好处!
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!