使用JavaScript提取EXIF数据 [英] Extracting EXIF data with JavaScript

查看:91
本文介绍了使用JavaScript提取EXIF数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在评估针对移动Web应用程序使用Canvas的图像上传技术.症结在于读取客户端的EXIF数据.此站点上的其他讨论点向出色的 Blueimp JavaScript图像加载 .我特别想从EXIF中提取:

I'm evaluating image upload techniques using Canvas for a mobile web app. The sticking point is reading EXIF data client-side. Other discussions on this site point towards the excellent Blueimp JavaScript Image Load. I particularly want to extract from EXIF:

  • 日期&拍照时间
  • 地理位置-纬度拍摄照片的经度

使用在iPhone上拍摄的照片(带有地理数据)在Windows Vista的Firefox v.33.1上测试Blueimp脚本,它成功提取了所有EXIF数据,包括日期,时间和日期.地理坐标.在iOS上对相同照片运行相同测试,它仅提取少量EXIF数据-仅提取尺寸和方向(我使用的是iPhone 5,iOS 8.1), 没有其他的.为什么是这样?是否有推荐的修补程序或替代JavaScript EXIF提取工具?

Testing the Blueimp script on Firefox v.33.1 on Windows Vista using a photo taken on an iPhone (with geo data), it successfully extracts all the EXIF data including date, time & geocoords. Running the same test with the same photo on iOS and it only extracts a tiny amount of EXIF data - just the dimensions and orientation (I'm using iPhone 5, iOS 8.1), nothing else. Why is this? Is there a fix or an alternative JavaScript EXIF extraction tool to recommend?

很高兴收到我的建议,因为这正在引起我的注意!!预先感谢.

Suggestions very gratefully received as this is doing my head in!! Thanks in advance.

请注意:我不想在PHP的服务器端执行此操作,因为这需要上传完整的图像,这可能会降低移动带宽的速度,因此请使用canvas选项在客户端调整图像大小

推荐答案

在进一步了解此问题之后,

After more reading around on this issue, a similar question was asked here a year ago, with no satisfactory responses. According to one commenter, uploaded files on iOS devices only get access to a sanitized version of the file for privacy reasons. This means what useful stuff like time/date and GPS is stripped out of a file before it is made available to the browser.

哪种想法挫败了这个想法.:(

Which kind of scuppers this idea. :(

这篇关于使用JavaScript提取EXIF数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆