diff --git a/importPicture/src/osm/jp/gpx/ImportPicture.java b/importPicture/src/osm/jp/gpx/ImportPicture.java index 1c2367a..e7baaa2 100644 --- a/importPicture/src/osm/jp/gpx/ImportPicture.java +++ b/importPicture/src/osm/jp/gpx/ImportPicture.java @@ -160,7 +160,6 @@ return; } String dateTimeOriginal = exif.getFieldValue(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL)[0]; - System.out.println("[ImportPicture.debug] EXIF Date and Time (orignal) = '"+ dateTimeOriginal +"'"); long lastModifyTime = ImportPicture.toEXIFDate(dateTimeOriginal).getTime(); imgtime = new Date(lastModifyTime); } @@ -450,7 +449,6 @@ continue; } String dateTimeOriginal = exif.getFieldValue(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL)[0]; - System.out.println("[ImportPicture.debug] EXIF Date and Time (orignal) = '"+ dateTimeOriginal +"'"); itime = ImportPicture.toEXIFDate(dateTimeOriginal); } System.out.print(String.format("%20s|", toUTCString(itime))); diff --git a/importPicture/test/osm/jp/gpx/ImportPictureTest.java b/importPicture/test/osm/jp/gpx/ImportPictureTest.java index d6967d7..7f9bb42 100644 --- a/importPicture/test/osm/jp/gpx/ImportPictureTest.java +++ b/importPicture/test/osm/jp/gpx/ImportPictureTest.java @@ -198,7 +198,7 @@ // out of time (2017-05-29T01:33:03 - 2017-05-29T01:35:53) new Expecter("separate/20170529_103315A.jpg", true, "2017:05:29 01:33:14",true), - new Expecter("separate/20170529_103545A.jpg", true, "2017:05:29 10:35:45",true), + new Expecter("separate/20170529_103545A.jpg", true, "2017:05:29 01:35:44",true), // in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35) new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true), @@ -222,7 +222,7 @@ // in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05) new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true), new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true), - new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true), + new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:05",true), // out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37) new Expecter("separate/20170529_102409A.jpg", false, null, false), @@ -238,7 +238,7 @@ // in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35) new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true), - new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true), + new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:19",true), }), new Fixture( @@ -252,16 +252,16 @@ new Expecter("separate/separate_.gpx", true, null, true), // out of time ( - 2017-05-29T01:23:18) - new Expecter("separate/20170529_102305A.jpg", true, "2017:05:29 01:23:06", true), + new Expecter("separate/20170529_102305A.jpg", true, "2017:05:29 01:23:05", true), new Expecter("separate/20170529_102314A.jpg", true, "2017:05:29 01:23:14", true), // in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05) new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true), new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true), - new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true), + new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:05",true), // out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37) - new Expecter("separate/20170529_102409A.jpg", true, "2017:05:29 01:24:10",true), + new Expecter("separate/20170529_102409A.jpg", true, "2017:05:29 01:24:09",true), new Expecter("separate/20170529_102418A.jpg", true, "2017:05:29 01:24:18",true), // in TRKSEG(2) (2017-05-29T01:24:37 - 2017-05-29T01:33:03) @@ -269,12 +269,12 @@ new Expecter("separate/20170529_103246A.jpg", true, "2017:05:29 01:32:46",true), // out of time (2017-05-29T01:33:03 - 2017-05-29T01:35:53) - new Expecter("separate/20170529_103315A.jpg", true, "2017:05:29 01:33:14",true), - new Expecter("separate/20170529_103545A.jpg", true, "2017:05:29 01:35:44",true), + new Expecter("separate/20170529_103315A.jpg", true, "2017:05:29 01:33:15",true), + new Expecter("separate/20170529_103545A.jpg", true, "2017:05:29 01:35:45",true), // in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35) new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true), - new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true), + new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:19",true), }), @@ -367,7 +367,7 @@ // in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05) new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true), new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true), - new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true), + new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:05",true), // out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37) new Expecter("separate/20170529_102409A.jpg", false, null, false), @@ -383,7 +383,7 @@ // in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35) new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true), - new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true), + new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:19",true), }), new Fixture( @@ -397,16 +397,16 @@ new Expecter("separate/separate_.gpx", true, null, true), // out of time ( - 2017-05-29T01:23:18) - new Expecter("separate/20170529_102305A.jpg", true, "2017:05:29 01:23:06", true), + new Expecter("separate/20170529_102305A.jpg", true, "2017:05:29 01:23:05", true), new Expecter("separate/20170529_102314A.jpg", true, "2017:05:29 01:23:14", true), // in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05) new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true), new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true), - new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true), + new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:05",true), // out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37) - new Expecter("separate/20170529_102409A.jpg", true, "2017:05:29 01:24:10",true), + new Expecter("separate/20170529_102409A.jpg", true, "2017:05:29 01:24:09",true), new Expecter("separate/20170529_102418A.jpg", true, "2017:05:29 01:24:18",true), // in TRKSEG(2) (2017-05-29T01:24:37 - 2017-05-29T01:33:03) @@ -414,12 +414,12 @@ new Expecter("separate/20170529_103246A.jpg", true, "2017:05:29 01:32:46",true), // out of time (2017-05-29T01:33:03 - 2017-05-29T01:35:53) - new Expecter("separate/20170529_103315A.jpg", true, "2017:05:29 01:33:14",true), - new Expecter("separate/20170529_103545A.jpg", true, "2017:05:29 01:35:44",true), + new Expecter("separate/20170529_103315A.jpg", true, "2017:05:29 01:33:15",true), + new Expecter("separate/20170529_103545A.jpg", true, "2017:05:29 01:35:45",true), // in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35) new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true), - new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true), + new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:19",true), }), new Fixture( @@ -511,7 +511,7 @@ // in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05) new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true), new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true), - new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true), + new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:05",true), // out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37) new Expecter("separate/20170529_102409A.jpg", false, null, false), @@ -527,7 +527,7 @@ // in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35) new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true), - new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true), + new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:19",true), }), new Fixture( @@ -541,16 +541,16 @@ new Expecter("separate/separate_.gpx", true, null, true), // out of time ( - 2017-05-29T01:23:18) - new Expecter("separate/20170529_102305A.jpg", true, "2017:05:29 01:23:06", true), + new Expecter("separate/20170529_102305A.jpg", true, "2017:05:29 01:23:05", true), new Expecter("separate/20170529_102314A.jpg", true, "2017:05:29 01:23:14", true), // in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05) new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true), new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true), - new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true), + new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:05",true), // out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37) - new Expecter("separate/20170529_102409A.jpg", true, "2017:05:29 01:24:10",true), + new Expecter("separate/20170529_102409A.jpg", true, "2017:05:29 01:24:09",true), new Expecter("separate/20170529_102418A.jpg", true, "2017:05:29 01:24:18",true), // in TRKSEG(2) (2017-05-29T01:24:37 - 2017-05-29T01:33:03) @@ -558,12 +558,12 @@ new Expecter("separate/20170529_103246A.jpg", true, "2017:05:29 01:32:46",true), // out of time (2017-05-29T01:33:03 - 2017-05-29T01:35:53) - new Expecter("separate/20170529_103315A.jpg", true, "2017:05:29 01:33:14",true), - new Expecter("separate/20170529_103545A.jpg", true, "2017:05:29 01:35:44",true), + new Expecter("separate/20170529_103315A.jpg", true, "2017:05:29 01:33:15",true), + new Expecter("separate/20170529_103545A.jpg", true, "2017:05:29 01:35:45",true), // in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35) new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true), - new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true), + new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:19",true), }), }; @@ -597,7 +597,7 @@ // EXIF-TIME が正しく設定されていること String exifTime = ImportPicture.toEXIFString(ImportPicture.toEXIFDate(exif.getFieldValue(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL)[0])); - System.out.println("[debug] exifTime = '"+ exifTime +"'"); + System.out.println("[debug] exifTime = '"+ exifTime +"' <--> '"+ es[i].timeStr +"'"); assertThat(exifTime, is(es[i].timeStr)); } }