From: Brett Parker Date: Tue, 19 Apr 2005 22:01:24 +0000 (+0000) Subject: Fix the image height code X-Git-Tag: release-1.0.0~4 X-Git-Url: https://git.sommitrealweird.co.uk/bpgallery.git/commitdiff_plain/48891b004a2759bb9eee2f6e710a121232358e9b?ds=sidebyside;hp=ff202b926acd93838eb5412acfc389e19512d854 Fix the image height code Make the max height of the icons actually be calculated. git-archimport-id: arch@sommitrealweird.co.uk--2005-desktop/bpgallery--mainline--1.0--patch-1 --- diff --git a/bpgallery.sh b/bpgallery.sh index 719ff9c..ef403e7 100755 --- a/bpgallery.sh +++ b/bpgallery.sh @@ -254,17 +254,12 @@ $BPGALLERY_TAIL_FUNCTION >> index.html cd icons -for imageext in $IMAGEEXTENSIONS; do - if ( ls "*.$imageext" > /dev/null 2>/dev/null ); then - TEMPMAX=$($IDENTIFYCOMMAND *.$imageext | grep "Geometry:" | sed -r 's#^.*Geometry:.*?[0-9]+x([0-9]+)\+.*$#\1#' | $SORTCOMMAND -g -r | $HEADCOMMAND -n 1) - if [[ $TEMPMAX -gt $MAXHEIGHT ]]; then - MAXHEIGHT=$TEMPMAX - fi - fi -done +MAXHEIGHT=$($FINDCOMMAND . $FINDIMAGESOPTIONS | $XARGSCOMMAND -0 $IDENTIFYCOMMAND -format "%h\n" | $GREPCOMMAND -v "^$" | $SORTCOMMAND -g -r | $HEADCOMMAND -n 1) cd .. +# add a bit to the maxheight for the size of the caption +MAXHEIGHT=$((MAXHEIGHT+75)) $BPGALLERY_STYLESHEET_FUNCTION > style.css