From 07d428178ce8844aff542f8308527c50e700ed85 Mon Sep 17 00:00:00 2001 From: Martijn Braam Date: Thu, 18 Jan 2024 14:38:16 +0100 Subject: [PATCH] Implement YUV sources in postprocess.sh --- data/postprocess.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/data/postprocess.sh b/data/postprocess.sh index 0f14521..17aec66 100755 --- a/data/postprocess.sh +++ b/data/postprocess.sh @@ -5,6 +5,9 @@ # directory containing the raw files in the burst. The contents # are 1.dng, 2.dng.... up to the number of photos in the burst. # +# If the capture was from a YUV source instead of raw sensor data +# the burst dir will contain .jpg files instead of .dng files +# # The second argument is the filename for the final photo without # the extension, like "/home/user/Pictures/IMG202104031234" # @@ -27,6 +30,15 @@ SAVE_DNG="$3" MAIN_PICTURE="$BURST_DIR"/1 +if [ -f "$MAIN_PICTURE.jpg" ]; then + # Just move over the main jpeg if this was a YUV capture + cp "$MAIN_PICTURE.jpg" "$TARGET_NAME.jpg" + + # Clean up the temp dir containing the burst + rm -rf "$BURST_DIR" + exit 0 +fi + # Copy the first frame of the burst as the raw photo cp "$BURST_DIR"/1.dng "$TARGET_NAME.dng"