New colored captcha !

This commit is contained in:
Adrien Bourmault 2020-12-30 20:01:50 +01:00 committed by root
parent a60c9c6320
commit 35ad95bb68
2 changed files with 26 additions and 18 deletions

View File

@ -77,16 +77,18 @@ B2_LINE_STOP_X=$((100 + $R % 40))
#B3_LINE_STOP_X=$((100 + $R % 40))
get_random
ROLL_A=$(($R % 10 + 50))
RAND_A=$(($R % 10 + 40))
get_random
ROLL_B=$(($R % 20))
RAND_B=$(($R % 14))
get_random
ROLL_C=$(($R % 20 + 60))
RAND_C=$(($R % 10 + 60))
get_random
RAND_D=$(($R % 20))
convert -size 180x60 xc:none -pointsize 40 \
\( -clone 0 -fill white \
-stroke black -strokewidth 4 -annotate +0+40 "$INPUT" \
-stroke white -strokewidth 2 -annotate +0+40 "$INPUT" \
\( -clone 0 -fill plasma:fractal \
-stroke plasma:fractal -strokewidth 3 -annotate "2x0+0+$RAND_A" "$INPUT" \
-stroke plasma:fractal -strokewidth 4 -annotate "2x0+0+$RAND_A" "$INPUT" \
-roll +$ROLL_X+0 \
-wave "$WAVE1_AMPLITUDE"x"$WAVE1_LENGTH" \
-roll -$ROLL_X+0 \) \
@ -101,6 +103,8 @@ convert -size 180x60 xc:none -pointsize 40 \
-strokewidth 2 -draw "line 0,$W2_LINE_START_Y 140,$W2_LINE_STOP_Y" \
-strokewidth 2 -draw "line 0,$W3_LINE_START_Y 140,$W3_LINE_STOP_Y" \
-wave "$WAVE3_AMPLITUDE"x"$WAVE3_LENGTH" \) \
-distort Perspective "0,0,0,0 0,$ROLL_C,0,80 80,0,80,$ROLL_B 80,80,80,$ROLL_A" \
-flatten -crop 140x60 +repage -quality 100 -depth 11 png:-
-distort Perspective "0,0,0,0 0,$RAND_C,0,80 80,0,80,5 80,80,80,55" \
-rotate "+$RAND_D" \
\( -size 140x60 xc: +noise Random -alpha set -channel A -evaluate set 30% \) \
-compose add \
-flatten -crop 140x60 +repage -quality 500 -depth 11 png:-

View File

@ -77,16 +77,18 @@ B2_LINE_STOP_X=$((100 + $R % 40))
#B3_LINE_STOP_X=$((100 + $R % 40))
get_random
ROLL_A=$(($R % 10 + 50))
RAND_A=$(($R % 10 + 40))
get_random
ROLL_B=$(($R % 20))
RAND_B=$(($R % 14))
get_random
ROLL_C=$(($R % 20 + 60))
RAND_C=$(($R % 10 + 60))
get_random
RAND_D=$(($R % 20))
convert -size 180x60 xc:none -pointsize 40 \
\( -clone 0 -fill white \
-stroke black -strokewidth 4 -annotate +0+40 "$INPUT" \
-stroke white -strokewidth 2 -annotate +0+40 "$INPUT" \
\( -clone 0 -fill plasma:fractal \
-stroke plasma:fractal -strokewidth 3 -annotate "2x0+0+$RAND_A" "$INPUT" \
-stroke plasma:fractal -strokewidth 4 -annotate "2x0+0+$RAND_A" "$INPUT" \
-roll +$ROLL_X+0 \
-wave "$WAVE1_AMPLITUDE"x"$WAVE1_LENGTH" \
-roll -$ROLL_X+0 \) \
@ -101,6 +103,8 @@ convert -size 180x60 xc:none -pointsize 40 \
-strokewidth 2 -draw "line 0,$W2_LINE_START_Y 140,$W2_LINE_STOP_Y" \
-strokewidth 2 -draw "line 0,$W3_LINE_START_Y 140,$W3_LINE_STOP_Y" \
-wave "$WAVE3_AMPLITUDE"x"$WAVE3_LENGTH" \) \
-distort Perspective "0,0,0,0 0,$ROLL_C,0,80 80,0,80,$ROLL_B 80,80,80,$ROLL_A" \
-flatten -crop 140x60 +repage -quality 100 -depth 11 png:-
-distort Perspective "0,0,0,0 0,$RAND_C,0,80 80,0,80,5 80,80,80,55" \
-rotate "+$RAND_D" \
\( -size 140x60 xc: +noise Random -alpha set -channel A -evaluate set 30% \) \
-compose add \
-flatten -crop 140x60 +repage -quality 500 -depth 11 png:-