mirror of
https://github.com/apache/cordova-plugin-camera.git
synced 2026-08-02 00:00:04 +08:00
feat(android): Added originalDateTime to exif handling
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user