Save generated captchas in /var/lib/ejabberd/chapril_captchas/

This reverts commit 3276a09029.
This commit is contained in:
pitchum 2021-01-09 11:23:35 +01:00 committed by root
parent bbd483e977
commit 1e774e4076
2 changed files with 18 additions and 0 deletions

View File

@ -125,6 +125,15 @@ RAND_ANGLE=$(($R % 3))
get_random
RAND_INDEX=$(($R % ${#TRANSFORMATIONS[@]}))
convert -size 300x60 xc:none -pointsize 20 \
\( -clone 0 -fill black \
-stroke black -strokewidth 1 \
-annotate "${RAND_ANGLE}x${RAND_ITALIC}+0+0" "\n $(${TRANSFORMATIONS[$RAND_INDEX]})" \
-roll +$ROLL_X+0 \
-wave "$WAVE1_AMPLITUDE"x"$WAVE1_LENGTH" \
-roll -$ROLL_X+0 \) \
-flatten -crop 300x60 +repage -quality 500 -depth 11 png:"/var/lib/ejabberd/chapril_captchas/${INPUT}_$(date "+%Y-%m-%d-%H%M%S").png"
convert -size 300x60 xc:none -pointsize 20 \
\( -clone 0 -fill black \
-stroke black -strokewidth 1 \

View File

@ -125,6 +125,15 @@ RAND_ANGLE=$(($R % 3))
get_random
RAND_INDEX=$(($R % ${#TRANSFORMATIONS[@]}))
convert -size 300x60 xc:none -pointsize 20 \
\( -clone 0 -fill black \
-stroke black -strokewidth 1 \
-annotate "${RAND_ANGLE}x${RAND_ITALIC}+0+0" "\n $(${TRANSFORMATIONS[$RAND_INDEX]})" \
-roll +$ROLL_X+0 \
-wave "$WAVE1_AMPLITUDE"x"$WAVE1_LENGTH" \
-roll -$ROLL_X+0 \) \
-flatten -crop 300x60 +repage -quality 500 -depth 11 png:"/var/lib/ejabberd/chapril_captchas/EXPERIMENTAL${INPUT}_$(date "+%Y-%m-%d-%H%M%S").png"
convert -size 300x60 xc:none -pointsize 20 \
\( -clone 0 -fill black \
-stroke black -strokewidth 1 \