如何读取Jpeg文件的标题以获取时间信息 [英] How Do I Read Header Of A Jpeg File To Get Time Information

查看:89
本文介绍了如何读取Jpeg文件的标题以获取时间信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要拍摄照片的时间和日期

解决方案

Afaik,jpeg标题中没有时间戳...


如解决方案1所述,纯JPEG文件没有时间戳。但是附加信息可以存在于特定于应用的元数据(例如EXIF,IPTC)中。因此,您必须解析APPn标记的标题,找到有效负载,并从中获取信息。



作为解析标题的起点,请参阅文章< a href =http://www.codeproject.com/Articles/1208/Extracting-IPTC-header-information-from-JPEG-image>从JPEG图像中提取IPTC标题信息 [ ^ ]。

i need time and date of that picture was taken

解决方案

Afaik, there is no timestamp in the jpeg header...


As already mentioned by Solution 1, there is no timestamp for pure JPEG files. But additional information may be present in application specific meta data (e.g. EXIF, IPTC). So you must parse the header for APPn markers, locate the payload, and get the information out of it.

As a starting point to parse the header see the article Extracting IPTC header information from JPEG images[^].


这篇关于如何读取Jpeg文件的标题以获取时间信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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