87
|
1 #!/usr/bin/env python
|
|
2 #
|
|
3 # A very simple example that creates a random image from the
|
|
4 # PseudoGimpy CAPTCHA, saves and shows it, and prints the list
|
|
5 # of solutions. Normally you would call testSolutions rather
|
|
6 # than reading this list yourself.
|
|
7 #
|
|
8 from Captcha.Visual.Tests import PseudoGimpy, AngryGimpy
|
|
9 import numpy
|
|
10 #from numpy import *
|
|
11
|
|
12 g = AngryGimpy()
|
|
13 i = g.render()
|
|
14 a = numpy.asarray(i)
|
|
15 b = numpy.zeros((2, 2), numpy.int8)
|
|
16 c = a == b
|
|
17 print c
|
|
18 i.save("output.png")
|
|
19 i.show()
|
|
20 #print a
|
|
21 #print g.solutions
|