From 8403b5c39a11ca27ca154ce2f9898a7dfe0dbae0 Mon Sep 17 00:00:00 2001 From: Brett Parker Date: Sun, 16 Apr 2006 10:06:12 +0000 Subject: [PATCH 1/1] fix icon resizing code Now understands that it needs to replace icons that are a different width to that specified on the command line in the case of updating a gallery. git-archimport-id: arch@sommitrealweird.co.uk--2005-desktop/bpgallery--mainline--1.0--patch-12 --- TODO | 5 ++--- bpgallery.sh | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/TODO b/TODO index 05290a6..28b52ff 100644 --- a/TODO +++ b/TODO @@ -1,10 +1,9 @@ * Add in a middle image size, so thumbs -> medium -> full size (and option for this) -* Allow to recreate galleries and use new captions (only resizing changed - images) - mostly done, needs to be able to check and change based on - the width specified then it'll be finished * Allow a fixed height to be specified instead or as well as a fixed width, in the latter case, resize to which ever fits the bounding box, but keep the aspect ratio. +* Allow ordering of images rather than the current "sort" based algorithm on + filename. * Make sure that the tools we require are available (i.e. check that we have xargs, convert, identify etc) diff --git a/bpgallery.sh b/bpgallery.sh index 0317e0b..9e4b64c 100755 --- a/bpgallery.sh +++ b/bpgallery.sh @@ -19,7 +19,7 @@ set -f -VERSION="1.0.1" +VERSION="1.0.1+arch" function bpgallery_default_head() { cat <&1 | while read throwout; do $ECHOCOMMAND done: $currentimage/$imagestoupdate images; echo $throwout; currentimage=$((currentimage+1)); done + $FINDCOMMAND . $FINDIMAGESOPTIONS | $XARGSCOMMAND -0 --replace $ECHOCOMMAND {} | while read filename; do tempfilename=${filename//\"/\\\"/}; if [ ! -r "icons/$tempfilename" ] || [ "$tempfilename" -nt "icons/$tempfilename" ] || [ $($IDENTIFYCOMMAND -format "%w" "icons/$filename") -ne $WIDTH ]; then $ECHOCOMMAND -n $filename; $ECHOCOMMAND -n -e "\000"; fi; done | $XARGSCOMMAND -0 --verbose --max-procs=4 --replace $CONVERTTOOL -resize $WIDTH '{}' 'icons/{}' 2>&1 | while read throwout; do $ECHOCOMMAND done: $currentimage/$imagestoupdate images; currentimage=$((currentimage+1)); done echo done: $imagestoupdate/$imagestoupdate images fi -- 2.39.5