summaryrefslogtreecommitdiff
path: root/src/photoalbum.sh
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2022-02-20 19:53:10 +0000
committerPaul Buetow <paul@buetow.org>2022-02-20 19:53:10 +0000
commit9e44fb9ee400d8776082075c1fb8f74a584025fe (patch)
tree029766599b524e195e692b5715a01617895a0df9 /src/photoalbum.sh
parent90fe2105156b4a3d425f24b9d15d78c52333af0d (diff)
fine tuning
Diffstat (limited to 'src/photoalbum.sh')
-rwxr-xr-xsrc/photoalbum.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/photoalbum.sh b/src/photoalbum.sh
index 81903e0..d60e84f 100755
--- a/src/photoalbum.sh
+++ b/src/photoalbum.sh
@@ -61,10 +61,12 @@ scalephotos () {
continue
fi
- echo "Scaling $photo to $destphoto_nospace"
+ echo "Processing $photo to $destphoto_nospace"
if [ -n "$HEIGHT" ]; then
+ # Scale down size.
convert -auto-orient -geometry "$HEIGHT" "$photo" "$destphoto_nospace"
else
+ # Keep original size
convert -auto-orient "$photo" "$destphoto_nospace"
fi
done
@@ -140,7 +142,9 @@ albumhtml () {
declare dirname="$DIST_DIR/$thumbs_dir"
test ! -d "$dirname" && mkdir -p "$dirname"
echo "Creating thumb $DIST_DIR/$thumbs_dir/$photo"
- convert -geometry "x$THUMBHEIGHT" "$photo" "$DIST_DIR/$thumbs_dir/$photo"
+ # Double the height, as CSS will scale up/down images based on boxing too.
+ declare height=$((THUMBHEIGHT * 2))
+ convert -geometry "x$height" "$photo" "$DIST_DIR/$thumbs_dir/$photo"
dirname="$DIST_DIR/$blurs_dir"
test ! -d "$dirname" && mkdir -p "$dirname"