4 # A script to batch-convert all source image files into suitable
5 # slideset image files. It converts all *.png, *.jpg and *.xcf.gz
6 # files into the suitably sized jpg images in the datafiles directory.
9 DEST=../../../resources/datafiles/tours
11 CONVERSION="-background #ececec -flatten -geometry 600x400 -quality 85"
14 # Convert all xcf files
15 find -iname "*.xcf.gz" | grep -v MANUAL | while read FILE; do
18 BASE="$(echo $FILE | sed 's/\.xcf\.gz$//')"
19 xcf2png "$FILE" | convert $CONVERSION - $DEST/$BASE.jpg
23 # Convert all png and jpg files
24 find -iname "*.png" -o -iname "*.jpg" | grep -v MANUAL | while read FILE; do
27 BASE="$(echo $FILE | sed 's/\.png$//' | sed 's/\.jpg$//')"
28 convert $CONVERSION $FILE $DEST/$BASE.jpg