view data_generation/transformations/pycaptcha/simple_example.py @ 273:7800be7bce66

changes in ttf2jpg and pycaptcha to load a file list with cPickle (instead of doing a listdir()) in order to have always the same list order from different machine (to reproduce generation)
author Xavier Glorot <glorotxa@iro.umontreal.ca>
date Sun, 21 Mar 2010 16:45:48 -0400
parents 1f5937e9e530
children
line wrap: on
line source

#!/usr/bin/env python
#
# A very simple example that creates a random image from the
# PseudoGimpy CAPTCHA, saves and shows it, and prints the list
# of solutions. Normally you would call testSolutions rather
# than reading this list yourself.
#
from Captcha.Visual.Tests import PseudoGimpy, AngryGimpy
import numpy
#from numpy import *

#g = AngryGimpy()
#i = g.render()
#a = numpy.asarray(i)
#b = numpy.zeros((2, 2), numpy.int8)
#c = a == b
#print c
#i.save("output.png")
#i.show()
#print a
#print g.solutions