view data_generation/transformations/pycaptcha/Captcha/Visual/Pictures.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

""" Captcha.Visual.Pictures

Random collections of images
"""
#
# PyCAPTCHA Package
# Copyright (C) 2004 Micah Dowty <micah@navi.cx>
#

from Captcha import File
import Image


class ImageFactory(File.RandomFileFactory):
    """A factory that generates random images from a list"""
    extensions = [".png", ".jpeg"]
    basePath = "pictures"


abstract = ImageFactory("abstract")
nature = ImageFactory("nature")

### The End ###