Fixed buffer overflow and postprocessing metadata

This commit is contained in:
Martijn Braam 2020-10-02 21:08:09 +02:00
parent adc584ee1d
commit b7d43be635
2 changed files with 11 additions and 1 deletions

2
main.c
View File

@ -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

View File

@ -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