設置 | 登錄 | 註冊

作者共發了7篇帖子。

手机拍的照片上传到电脑上后是倒着的

1樓 巨大八爪鱼 2024-10-14 13:14

这跟JPEG Rotation and EXIF Orientation有关。

http://chunter.tistory.com/143

https://www.florian-rhomberg.net/2017/07/checking-the-current-orientation-of-the-image-and-rotate-if-necessary/

2樓 巨大八爪鱼 2024-10-14 13:34
jpg文件里面的metadata信息块有一个EXIF Orientation标志,可以设置照片是否翻转。但不是所有的看图软件和浏览器都支持这个标志。
4樓 巨大八爪鱼 2024-10-14 14:34
The most important of these additional details is the Orientation flag, stored in the JPEG APP1 marker under EXIF IFD0.
5樓 巨大八爪鱼 2024-10-14 14:37
其实摄像头之所以只设置一个翻转标志,不去翻转图像数据,是因为直接翻转图像数据的话会有数据损失(jpeg是有损压缩),无法保留摄像头输出的原始数据。
6樓 巨大八爪鱼 2024-10-14 14:43
Obtaining image metadata:http://johnbokma.com/java/obtaining-image-metadata.html
巨大八爪鱼https://www.zhihu.com/column/p/25216999
9樓 巨大八爪鱼 2024-10-14 17:32
Java判断手机拍摄的照片是否有翻转标志:https://zh.purasbar.com/post.php?t=29108

內容轉換:

回覆帖子
內容:
用戶名: 您目前是匿名發表。
驗證碼:
看不清?換一張