From 00d56802179879977dcb6ba7205b6fbdb2e4f66f Mon Sep 17 00:00:00 2001 From: simon987 Date: Sun, 21 Jun 2020 16:50:36 -0400 Subject: [PATCH] Add ExposureTime tag --- libscan/raw/raw.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libscan/raw/raw.c b/libscan/raw/raw.c index 63c5713..995f79c 100644 --- a/libscan/raw/raw.c +++ b/libscan/raw/raw.c @@ -9,7 +9,6 @@ #include "libavcodec/avcodec.h" #include "libavutil/imgutils.h" -#include __always_inline @@ -95,6 +94,10 @@ void parse_raw(scan_raw_ctx_t *ctx, vfile_t *f, document_t *doc) { snprintf(tmp, sizeof(tmp), "%.1f", libraw_lib->other.aperture); APPEND_STR_META(doc, MetaExifFNumber, tmp) + int denominator = (int)roundf(1 / libraw_lib->other.shutter); + snprintf(tmp, sizeof(tmp), "1/%d", denominator); + APPEND_STR_META(doc, MetaExifExposureTime, tmp) + APPEND_STR_META(doc, MetaMediaVideoCodec, "raw") if (ctx->tn_size <= 0) {