moving to resizing the images and not slicing them.

This commit is contained in:
Robert Johnson 2023-08-31 22:41:54 -04:00
parent b17d221d8d
commit d2acfebc8f

View File

@ -4,21 +4,26 @@
# You want.
if [ "$#" -ne 3 ]; then
echo "Usage: $0 <source_image> <output_base_name> <num_sizes>"
echo "Usage: $0 <source_image> <width> <height> <file_prefix>"
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))