MediaInfo does not support EXIF image metadata natively so we use the metadata-extractor library and implicitly merge that information in

This commit is contained in:
Reinhard Pointner 2017-02-25 19:24:47 +08:00
parent bd826cb297
commit 16a36757a7
1 changed files with 1 additions and 2 deletions

View File

@ -154,8 +154,7 @@ public class MediaInfo implements Closeable {
if (streamKind == StreamKind.Image && streamNumber == 0) { if (streamKind == StreamKind.Image && streamNumber == 0) {
String path = get(StreamKind.General, 0, "CompleteName"); String path = get(StreamKind.General, 0, "CompleteName");
try { try {
ImageMetadata exif = new ImageMetadata(new File(path)); streamInfo.putAll(new ImageMetadata(new File(path)));
exif.forEach(streamInfo::putIfAbsent);
} catch (Throwable e) { } catch (Throwable e) {
debug.warning(format("%s: %s", e, path)); debug.warning(format("%s: %s", e, path));
} }