如何获取日期图片创建在java [英] How to get date picture created in java

查看:229
本文介绍了如何获取日期图片创建在java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提取创建jpg文件的日期。 Java具有File对象的lastModified方法,但似乎不支持从文件中提取创建的日期。我相信信息存储在文件中,当我在Win XP中将鼠标指针悬停在文件上时,我看到的日期与使用DOS中的文件上的dir / TC使用JNI可以得到的不同。 p>

I would like to extract the date a jpg file was created. Java has the lastModified method for the File object, but appears to provide no support for extracting the created date from the file. I believe the information is stored within the file as the date I see when I hover the mouse pointer over the file in Win XP is different than what I can get by using JNI with "dir /TC" on the file in DOS.

推荐答案

信息以图像格式存储,格式为 EXIF 链接文本。有几个图书馆能够阅读这种格式,如这一个

The information is stored within the image in a format called EXIF or link text. There several libraries out there capable of reading this format, like this one

这篇关于如何获取日期图片创建在java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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