diff options
author | KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> | 2021-08-15 13:57:16 -0300 |
---|---|---|
committer | KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> | 2021-08-15 13:57:16 -0300 |
commit | 7f7625d9b79503d74f938f4be90bc50f926a6d56 (patch) | |
tree | c578845e69725d0c2b35009fe5eb144958c39303 | |
parent | ad30def5420185dfbe2107b1ec972bddc975b358 (diff) |
imagemagick should output to stderr if we fail
-rw-r--r-- | verification.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/verification.go b/verification.go index c575ae4..67bbf30 100644 --- a/verification.go +++ b/verification.go @@ -411,12 +411,14 @@ func CreateNewCaptcha(db *sql.DB) { } cmd := exec.Command("convert", "-size", "200x98", pattern, "-transparent", "white", file) + cmd.Stderr = os.Stderr err := cmd.Run() CheckError(err, "error with captcha first pass") cmd = exec.Command("convert", file, "-fill", "blue", "-pointsize", "62", "-annotate", "+0+70", captcha, "-tile", "pattern:left30", "-gravity", "center", "-transparent", "white", file) + cmd.Stderr = os.Stderr err = cmd.Run() @@ -425,6 +427,7 @@ func CreateNewCaptcha(db *sql.DB) { rnd = fmt.Sprintf("%d", rand.Intn(24)-12) cmd = exec.Command("convert", file, "-rotate", rnd, "-wave", "5x35", "-distort", "Arc", "20", "-wave", "2x35", "-transparent", "white", file) + cmd.Stderr = os.Stderr err = cmd.Run() |