cut_counters/cut_counters.sh

16 lines
365 B
Bash
Raw Normal View History

2023-08-30 19:25:46 -04:00
#!/bin/bash
# To use this program, pleas supply an initial image, then the number of cuts
# You want.
width=`identify -ping -format '%w' $1`
height=`identify -ping -format '%h' $1`
no_v_slices=$2
no_h_slices=$3
file_prefix=$4
2023-08-30 22:43:42 -04:00
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