From 118f1029155f01623c0ca7c18d9359025b25fd12 Mon Sep 17 00:00:00 2001 From: tsxv478 Date: Fri, 30 Jun 2023 23:54:07 +0300 Subject: square thumbnails --- galgen | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/galgen b/galgen index 4e01e40..4ca4892 100755 --- a/galgen +++ b/galgen @@ -132,12 +132,9 @@ MY_NUM_FILES=0 for MY_FILENAME in *.[jJ][pP][gG]; do MY_FILELIST[$MY_NUM_FILES]=$MY_FILENAME (( MY_NUM_FILES++ )) - for MY_RES in "${MY_HEIGHTS[@]}"; do - if [[ ! -s $MY_THUMBDIR/$MY_RES/$MY_FILENAME ]]; then - debugOutput "$MY_THUMBDIR/$MY_RES/$MY_FILENAME" - $MY_CONVERT_COMMAND -auto-orient -strip -quality $MY_QUALITY -resize x$MY_RES "$MY_FILENAME" "$MY_THUMBDIR/$MY_RES/$MY_FILENAME" - fi - done + $MY_CONVERT_COMMAND -auto-orient -strip -quality $MY_QUALITY -resize "$MY_HEIGHT_SMALL^>" -gravity center -crop "$MY_HEIGHT_SMALL"x"$MY_HEIGHT_SMALL"+0+0 "$MY_FILENAME" "$MY_THUMBDIR/$MY_HEIGHT_SMALL/$MY_FILENAME" + $MY_CONVERT_COMMAND -auto-orient -strip -quality $MY_QUALITY -resize x$MY_HEIGHT_LARGE "$MY_FILENAME" "$MY_THUMBDIR/$MY_HEIGHT_LARGE/$MY_FILENAME" + cat >> "$MY_INDEX_HTML_FILE" << EOF
thumbnail: $MY_FILENAME -- cgit v1.2.3