https://github.com/drewnoakes/metadata-extractor/releases
String fileName = "file/fortest/20160501-103139_IMG_1551.JPG";
File imageFile = new File(fileName);
Metadata md = ImageMetadataReader.readMetadata(imageFile);
System.out.println(md.getFirstDirectoryOfType(ExifDirectoryBase.class).getDate(ExifDirectoryBase.TAG_DATETIME));
The result is as follows.
Sun May 01 19:31:39 JST 2016
Recommended Posts