From f91a910a81a49cd09f66b9549cba38e2132dd654 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 5 Feb 2022 14:30:13 +0000 Subject: GEOMETRY is optional --- src/photoalbum.default.conf | 7 ++++--- src/photoalbum.sh | 8 ++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/photoalbum.default.conf b/src/photoalbum.default.conf index 160a8ed..07026f3 100644 --- a/src/photoalbum.default.conf +++ b/src/photoalbum.default.conf @@ -1,9 +1,11 @@ # The title of the photoalbum TITLE='A simple Photoalbum' -# Diverse default values +# Thumbnail geometry THUMBGEOMETRY=250 -GEOMETRY=800 +# Normal geometry (when viewing photo). Uncomment, to keep original size. +GEOMETRY=1200 +# Max previews per page. MAXPREVIEWS=100 # Diverse directories, need to be full paths, not relative! @@ -22,4 +24,3 @@ TAR_OPTS='-c' # Some debugging options #set -e #set -x - diff --git a/src/photoalbum.sh b/src/photoalbum.sh index a044278..5d8c8b2 100755 --- a/src/photoalbum.sh +++ b/src/photoalbum.sh @@ -59,8 +59,12 @@ function scalephotos { if [ ! -f "${destphoto_nospace}" ]; then echo "Scaling ${photo} to ${destphoto_nospace}" - convert -auto-orient \ - -geometry ${GEOMETRY} "${photo}" "${destphoto_nospace}" + if [ ! -z "${GEOMETRY}" ]; then + convert -auto-orient \ + -geometry ${GEOMETRY} "${photo}" "${destphoto_nospace}" + else + convert -auto-orient "${photo}" "${destphoto_nospace}" + fi fi done } -- cgit v1.2.3