feat(android): Added originalDateTime to exif handling

This commit is contained in:
Marius Van Nieuwenhuyse
2026-07-27 20:37:01 +02:00
committed by GitHub
parent 4d8cc956b1
commit 2470f8d970
+5
View File
@@ -43,6 +43,7 @@ public class ExifHelper {
private String model = null;
private String orientation = null;
private String whiteBalance = null;
private String dateTimeOriginal = null;
private ExifInterface inFile = null;
private ExifInterface outFile = null;
@@ -100,6 +101,7 @@ public class ExifHelper {
this.model = inFile.getAttribute(ExifInterface.TAG_MODEL);
this.orientation = inFile.getAttribute(ExifInterface.TAG_ORIENTATION);
this.whiteBalance = inFile.getAttribute(ExifInterface.TAG_WHITE_BALANCE);
this.dateTimeOriginal = inFile.getAttribute(ExifInterface.TAG_DATETIME_ORIGINAL);
}
/**
@@ -170,6 +172,9 @@ public class ExifHelper {
if (this.whiteBalance != null) {
this.outFile.setAttribute(ExifInterface.TAG_WHITE_BALANCE, this.whiteBalance);
}
if (this.dateTimeOriginal != null) {
this.outFile.setAttribute(ExifInterface.TAG_DATETIME_ORIGINAL, this.dateTimeOriginal);
}
this.outFile.saveAttributes();
}