Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ Bug ]: 不能正确处理图片的orientation #129

Open
mave99a opened this issue Oct 13, 2023 · 6 comments
Open

[ Bug ]: 不能正确处理图片的orientation #129

mave99a opened this issue Oct 13, 2023 · 6 comments
Assignees

Comments

@mave99a
Copy link

mave99a commented Oct 13, 2023

🐛 Bug Report

详细描述

这张图片:
image

copy/paste 到 image bin 后:

image

说明不能正确处理图片的orientation

复现这个 bug

截图或报错信息(可选)

异常的行为

期望的行为

可能的解决方案(可选)

@FireTable
Copy link
Collaborator

请问 orientation 的操作,是在什么应用或者网站里面支持的? @mave99a
我怀疑是原图就是横的, orientation 只是被 app 给 rotate 了 90°?

@mave99a
Copy link
Author

mave99a commented Oct 14, 2023

iOS 等现代相机产生的照片里面有一个orientation的metadata。 能正确处理的网站或者app 都能正确显示, 不能处理的应用就会看到它是旋转的。 (你可以理解这样相机的硬件和软件实现最简单)

上图 在iOS, ChatGPT 里都显示正确, 到了imagebin upload 就躺下了,说明我们没有能处理这个照片的orientation。

@FireTable
Copy link
Collaborator

ok 理解了,我看看这个问题

@FireTable
Copy link
Collaborator

这个问题我复现了,但是比较诡异,感觉不是 uploader 的问题?

我在 macOS 分了 2 种方法旋转图片

  1. 空格预览图片 => 直接点旋转
    • 没有文件大小变化, 依然是 3.2MB, macOS 预览已经变成了竖着的图
    • copy paste + 选择文件上传,在 Discord, uploader, notion, 腾讯文档网页版,都是横着的图
    • 再 airdrop 到 iOS 竖着的
  2. 双击打开图片 => 点旋转 => 关闭软件
    • 文件打开变化从 3.2MB => 3MB, macOS 预览已经变成了竖着的图
    • copy paste + 选择文件上传,在 Discord, uploader, notion, 腾讯文档网页版,都是竖着的图
    • 再 airdrop 到 iOS 是竖着的
image

目前我感觉 uploader 跟其它软件 orientation 逻辑是一致的,只是我觉得第一种旋转的情形是苹果的系统给了人一种误解?

可能需要老冒试一下, 尤其是第一种情况下在 ChatGPT 的表现 @mave99a

@FireTable
Copy link
Collaborator

此外我在 iphone 旋转了照片再 airdrop 到 macOS, 拿到的照片是正常旋转后的,未遇到以上问题

@FireTable FireTable self-assigned this Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants