From 9b936686a30bcebc21ac81ab35f7edd10b8755c8 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Thu, 31 Dec 2020 13:36:06 +0100 Subject: [PATCH] Added waves --- captcha/captcha.sh | 18 +++++++++--------- captcha/experimental.sh | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/captcha/captcha.sh b/captcha/captcha.sh index 3abfaf5..ce1c940 100755 --- a/captcha/captcha.sh +++ b/captcha/captcha.sh @@ -86,25 +86,25 @@ get_random RAND_D=$(($R % 20)) convert -size 180x60 xc:none -pointsize 40 \ - \( -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 \) \ - \( -clone 0 -stroke black \ + \( -clone 0 -stroke plasma:fractal \ -strokewidth 1 -draw \ "line $B1_LINE_START_X,$B1_LINE_START_Y $B1_LINE_STOP_X,$B1_LINE_STOP_Y" \ -strokewidth 1 -draw \ "line $B2_LINE_START_X,$B2_LINE_START_Y $B2_LINE_STOP_X,$B2_LINE_STOP_Y" \ -wave "$WAVE2_AMPLITUDE"x"$WAVE2_LENGTH" \) \ - \( -clone 0 -stroke black \ + \( -clone 0 -stroke plasma:fractal \ -strokewidth 2 -draw "line 0,$W1_LINE_START_Y 140,$W1_LINE_STOP_Y" \ -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" \) \ + \( -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 \ -distort Perspective "0,0,0,0 0,$RAND_C,0,80 80,0,80,5 80,80,80,55" \ - -rotate "+$RAND_D" \ + -rotate "+$RAND_D" \) \ \( -size 140x60 xc: +noise Random -alpha set -channel A -evaluate set 40% \) \ -compose add \ -flatten -crop 140x60 +repage -quality 500 -depth 11 png:- diff --git a/captcha/experimental.sh b/captcha/experimental.sh index 3abfaf5..ce1c940 100755 --- a/captcha/experimental.sh +++ b/captcha/experimental.sh @@ -86,25 +86,25 @@ get_random RAND_D=$(($R % 20)) convert -size 180x60 xc:none -pointsize 40 \ - \( -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 \) \ - \( -clone 0 -stroke black \ + \( -clone 0 -stroke plasma:fractal \ -strokewidth 1 -draw \ "line $B1_LINE_START_X,$B1_LINE_START_Y $B1_LINE_STOP_X,$B1_LINE_STOP_Y" \ -strokewidth 1 -draw \ "line $B2_LINE_START_X,$B2_LINE_START_Y $B2_LINE_STOP_X,$B2_LINE_STOP_Y" \ -wave "$WAVE2_AMPLITUDE"x"$WAVE2_LENGTH" \) \ - \( -clone 0 -stroke black \ + \( -clone 0 -stroke plasma:fractal \ -strokewidth 2 -draw "line 0,$W1_LINE_START_Y 140,$W1_LINE_STOP_Y" \ -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" \) \ + \( -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 \ -distort Perspective "0,0,0,0 0,$RAND_C,0,80 80,0,80,5 80,80,80,55" \ - -rotate "+$RAND_D" \ + -rotate "+$RAND_D" \) \ \( -size 140x60 xc: +noise Random -alpha set -channel A -evaluate set 40% \) \ -compose add \ -flatten -crop 140x60 +repage -quality 500 -depth 11 png:-