From d2acfebc8f164b61397b766e8025836f22ff5643 Mon Sep 17 00:00:00 2001 From: Robert Johnson Date: Thu, 31 Aug 2023 22:41:54 -0400 Subject: [PATCH] moving to resizing the images and not slicing them. --- cut_counters.sh | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/cut_counters.sh b/cut_counters.sh index 7c83107..87cbae9 100755 --- a/cut_counters.sh +++ b/cut_counters.sh @@ -4,21 +4,26 @@ # You want. if [ "$#" -ne 3 ]; then - echo "Usage: $0 " + echo "Usage: $0 " exit 1 fi -width=`identify -ping -format '%w' $1` -height=`identify -ping -format '%h' $1` -no_v_slices=$2 -no_h_slices=$3 +# Set variables +w=$2 +h=$3 file_prefix=$4 -vert_size=`echo "$height/($no_h_slices+1)" | bc -l` -hort_size=`echo "$width/($no_v_slices+1)" | bc -l` -echo $vert_size -echo $hort_size +convert $inputjpg -gravity center -extent "${w}x${h}" output.jpg + + + + +# vert_size=`echo "$height/($no_h_slices+1)" | bc -l` +# hort_size=`echo "$width/($no_v_slices+1)" | bc -l` + +# echo $vert_size +# echo $hort_size for ((size=1; size<=num_sizes; size++)); do width=$((size * 100))