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"