简体   繁体   English

手机中的exif数据有多普遍?

[英]How universal is exif data in mobile phones?

I am making an app that uses exif.js https://github.com/exif-js/exif-js to read some exif data from the image the camera captures.我正在制作一个使用 exif.js https://github.com/exif-js/exif-js从相机捕获的图像中读取一些 exif 数据的应用程序。 The specific fields that I want is ImageWidth , ImageHeight , FocalLength , FocalLengthIn35mmFilm and Orientation .我想要的特定字段是ImageWidthImageHeightFocalLengthFocalLengthIn35mmFilmOrientation But I want to use the app on any phone.但我想在任何手机上使用该应用程序。 Does anyone know how universal this is?有谁知道这是多么普遍? Does all phones camera put in this data?所有手机的摄像头都会输入这些数据吗? I tested on a samsung note 4 and it was able to get these data.我在三星note 4上进行了测试,它能够获得这些数据。

Thanks谢谢

The vast majority of cameras create exif data when they capture a picture.绝大多数相机在拍摄图片时都会创建 exif 数据。 It'd be difficult to give a total percentage, but you can safely assume that most user's cameras will capture exif data.很难给出总百分比,但您可以放心地假设大多数用户的相机都会捕获 exif 数据。

To give you an idea, Flickr captures and publishes exif data for photos uploaded to its site.为了给您一个想法,Flickr 捕获并发布上传到其网站的照片的 exif 数据。 You can view the most popular cameras in use here: https://www.flickr.com/cameras您可以在此处查看最流行的相机: https : //www.flickr.com/cameras

You can view the EXIF specification here: http://www.exif.org/Exif2-2.PDF Go to page 24 for attribute names.您可以在此处查看 EXIF 规范: http : //www.exif.org/Exif2-2.PDF转至第 24 页了解属性名称。 To my knowledge, not many phones or camera break the standard.据我所知,没有多少手机或相机不符合标准。

Most cameras put EXIF in the photos and there's a spec (EXIF 2.2 or TIFF6.0) for defining the default tags.大多数相机将 EXIF 放在照片中,并且有一个规范(EXIF 2.2 或 TIFF6.0)用于定义默认标签。 Manufacturers always use the standard tags (ImageWidth, ISO, FocalLength, Orientation, etc...) and only add their own for additional data that doesn't fit any standard tags but.制造商总是使用标准标签(ImageWidth、ISO、FocalLength、Orientation 等),并且只为不适合任何标准标签的附加数据添加他们自己的标签。 You don't need to worry that they would use proprietary tag instead of one already covered in the EXIF standard.您不必担心他们会使用专有标签而不是 EXIF 标准中已经涵盖的标签。 Ie, if you can't find ImageWidth, don't worry about looking for PhotoWidth or anything else.即,如果您找不到 ImageWidth,请不要担心寻找 PhotoWidth 或其他任何东西。 The width info just isn't in the photo in this case.在这种情况下,宽度信息不在照片中。

You can also encounter some data stored in different data structures entirely - such as XMP (XML format, mostly used in panoramas or drone photos), ICC (color profiles), IPTC (descriptions, author info, copyright, etc...)您还可以遇到一些完全存储在不同数据结构中的数据——例如 XMP(XML 格式,主要用于全景或无人机照片)、ICC(颜色配置文件)、IPTC(描述、作者信息、版权等...)

Also.还有。 I'd like to offer alternative library exifr .我想提供替代库exifr I've written it because exif-js is pretty much dead now (left unmaintained for over 2 years now) and it's ineffective.我写它是因为 exif-js 现在几乎已经死了(现在已经超过 2 年没有维护了)并且它是无效的。 Whereas exifr was built to be super efficient, supports all the aforementioned data segments, the new HEIC file format, and more...而 exifr 的构建非常高效,支持所有上述数据段、新的 HEIC 文件格式等等......

You can also try out the library's playground and experiment with images and their output, or check out the repository and docs .您还可以尝试图书馆的游乐场并试验图像及其输出,或者查看存储库和文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM