Skip to content

Commit

Permalink
Merge branch 'patch-1' of https://github.com/HamOP/allsky into HamOP-…
Browse files Browse the repository at this point in the history
…patch-1
  • Loading branch information
thomasjacquin committed Dec 23, 2020
2 parents 65f404a + 093ff57 commit d554f63
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config.sh.repo
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ DAYTIME="1"
# Set 24Hr capture to true to save both night and day images to disk. By default, only night images are saved.
CAPTURE_24HR=false

# Resize images before cropping and saving
IMG_RESIZE=true
IMG_HEIGHT=1520
IMG_WIDTH=2028

# Crop the captured image, used to improve the images when using a fisheye lens
CROP_IMAGE=false
CROP_WIDTH=640
Expand Down
5 changes: 5 additions & 0 deletions scripts/saveImageDay.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ fi

IMAGE_TO_USE="$FULL_FILENAME"

# Resize the image if required
if [[ $IMG_RESIZE == "true" ]]; then
convert "$IMAGE_TO_USE" -resize "$IMG_WIDTH"x"$IMG_HEIGHT" $IMAGE_TO_USE
fi

# Crop the image around the center if required
if [[ $CROP_IMAGE == "true" ]]; then
convert "$IMAGE_TO_USE" -gravity Center -crop "$CROP_WIDTH"x"$CROP_HEIGHT"+"$CROP_OFFSET_X"+"$CROP_OFFSET_Y" +repage "$IMAGE_TO_USE";
Expand Down
5 changes: 5 additions & 0 deletions scripts/saveImageNight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ if [ "$DARK_FRAME_SUBTRACTION" = "true" ] ; then
IMAGE_TO_USE="$FILENAME-processed.$EXTENSION"
fi

# Resize the image if required
if [[ $IMG_RESIZE == "true" ]]; then
convert "$IMAGE_TO_USE" -resize "$IMG_WIDTH"x"$IMG_HEIGHT" $IMAGE_TO_USE
fi

# Crop the image around the center if required
if [[ $CROP_IMAGE == "true" ]]; then
convert "$IMAGE_TO_USE" -gravity Center -crop "$CROP_WIDTH"x"$CROP_HEIGHT"+"$CROP_OFFSET_X"+"$CROP_OFFSET_Y" +repage "$IMAGE_TO_USE";
Expand Down

0 comments on commit d554f63

Please sign in to comment.