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. # You want.
if [ "$#" -ne 3 ]; then 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 exit 1
fi fi
width=`identify -ping -format '%w' $1` # Set variables
height=`identify -ping -format '%h' $1` w=$2
no_v_slices=$2 h=$3
no_h_slices=$3
file_prefix=$4 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 convert $inputjpg -gravity center -extent "${w}x${h}" output.jpg
echo $hort_size
# 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 for ((size=1; size<=num_sizes; size++)); do
width=$((size * 100)) width=$((size * 100))