From b7d43be635baecd6168eca44758d083be8533905 Mon Sep 17 00:00:00 2001 From: Martijn Braam Date: Fri, 2 Oct 2020 21:08:09 +0200 Subject: [PATCH] Fixed buffer overflow and postprocessing metadata --- main.c | 2 +- postprocess.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/main.c b/main.c index 59eb8e3..0ee201a 100644 --- a/main.c +++ b/main.c @@ -90,7 +90,7 @@ static char *last_path = NULL; static int auto_exposure = 1; static int auto_gain = 1; static int burst_length = 5; -static char burst_dir[20]; +static char burst_dir[23]; static char processing_script[512]; // Widgets diff --git a/postprocess.sh b/postprocess.sh index dc9ad98..a057b6f 100755 --- a/postprocess.sh +++ b/postprocess.sh @@ -45,6 +45,16 @@ if [ -n "$DCRAW" ]; then if command -v convert &> /dev/null then convert "$BURST_DIR"/1.dng.tiff "$TARGET_NAME.jpg" + + # If exiftool is installed copy the exif data over from the tiff to the jpeg + # since imagemagick is stupid + if command -v exiftool &> /dev/null + then + exiftool -tagsFromfile "$BURST_DIR"/1.dng.tiff \ + -software="Megapixels" \ + -overwrite_original "$TARGET_NAME.jpg" + fi + else cp "$BURST_DIR"/1.dng.tiff "$TARGET_NAME.tiff" fi