diff options
| author | Paul Buetow <paul@buetow.org> | 2022-02-05 14:30:13 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2022-02-05 14:30:13 +0000 |
| commit | f91a910a81a49cd09f66b9549cba38e2132dd654 (patch) | |
| tree | 7d9f43b6946085d3c9f5ea24715f0fe0359c83f6 | |
| parent | c54942df3c23088466fa9a612de4dbeafb77630b (diff) | |
GEOMETRY is optional
| -rw-r--r-- | src/photoalbum.default.conf | 7 | ||||
| -rwxr-xr-x | 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 } |
