annotate data_generation/transformations/pycaptcha/Captcha/Visual/Pictures.py @ 531:85f2337d47d2

merging, praying that I did not delete stuff this time :)
author Dumitru Erhan <dumitru.erhan@gmail.com>
date Tue, 01 Jun 2010 18:19:40 -0700
parents 1f5937e9e530
children
rev   line source
87
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
1 """ Captcha.Visual.Pictures
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
2
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
3 Random collections of images
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
4 """
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
5 #
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
6 # PyCAPTCHA Package
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
7 # Copyright (C) 2004 Micah Dowty <micah@navi.cx>
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
8 #
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
9
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
10 from Captcha import File
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
11 import Image
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
12
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
13
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
14 class ImageFactory(File.RandomFileFactory):
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
15 """A factory that generates random images from a list"""
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
16 extensions = [".png", ".jpeg"]
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
17 basePath = "pictures"
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
18
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
19
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
20 abstract = ImageFactory("abstract")
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
21 nature = ImageFactory("nature")
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
22
4775b4195b4b code pour la generation de captchas
goldfinger
parents:
diff changeset
23 ### The End ###