如何使用JavaScript将EXIF方向值设置为HEIF(HEIC)图像格式中的1并将结果返回为斑点?

发布于 2025-01-23 23:44:47 字数 304 浏览 3 评论 0原文

我有一个由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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

如果没结果 2025-01-30 23:44:47

您不必担心它,因为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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文