Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
I am using the bc command in my script but I cannot figure out how to integrate it into the filter. I have taken out the bc and the filter output is the same as it is with the bc command. I could really use some help here. I appreciate your time.
count=$START
SETSTEPS=$(echo "scale=2; 1/2" | bc)
SETTING=$SETSTEPS
while [ $count -le $END ];
do
echo $count
#set for padding of 4 from 0-999.
if [ $count -lt 10 ]; then
convert ${IMGDIR}${IMG} -charcoal $count ${OUTDIR}${OUT}.000$count.jpg
fi
if [ $count -ge 10 ] && [ $count -le 99 ]; then
convert ${IMGDIR}${IMG} -charcoal $count ${OUTDIR}${OUT}.00$count.jpg
fi
if [ $count -ge 100 ] ; then
convert ${IMGDIR}${IMG} -charcoal $count ${OUTDIR}${OUT}.0$count.jpg
fi
SETTING=$(echo "scale=2; $SETTING+$SETSTEPS" | bc)
echo "processing frame: "$count " setting is: " $SETTING "setsteps is " $SETSTEPS""
let count=count+1
This is from the terminal. I want this math to integrate with the filter output of the image. Basically the image goes lighter to darker over time, I want it to get darker at a slower rate. I know 1/2 wont do that but this is just an example.
processing frame: 0 setting is: 1.00 setsteps is .50
1
processing frame: 1 setting is: 1.50 setsteps is .50
2
processing frame: 2 setting is: 2.00 setsteps is .50
3
processing frame: 3 setting is: 2.50 setsteps is .50
4
processing frame: 4 setting is: 3.00 setsteps is .50
5
processing frame: 5 setting is: 3.50 setsteps is .50
6
processing frame: 6 setting is: 4.00 setsteps is .50
7
processing frame: 7 setting is: 4.50 setsteps is .50
8
processing frame: 8 setting is: 5.00 setsteps is .50
9
processing frame: 9 setting is: 5.50 setsteps is .50
10
processing frame: 10 setting is: 6.00 setsteps is .50
oops, forgot to change that. Well everything works now. I guess the charcoal filter only changes by integer values, but this will still slow down the speed in which it takes to get dark. Thanks.