~ubuntu-branches/ubuntu/quantal/python-imaging/quantal-updates

« back to all changes in this revision

Viewing changes to PIL/ImageTransform.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2009-11-20 19:22:59 UTC
  • mfrom: (2.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091120192259-cmnfui5tv2jtq4xu
Tags: 1.1.7-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#
2
2
# The Python Imaging Library.
3
 
# $Id: ImageTransform.py 2813 2006-10-07 10:11:35Z fredrik $
 
3
# $Id$
4
4
#
5
5
# transform wrappers
6
6
#
15
15
 
16
16
import Image
17
17
 
18
 
class Transform:
 
18
class Transform(Image.ImageTransformHandler):
19
19
    def __init__(self, data):
20
20
        self.data = data
21
21
    def getdata(self):
22
22
        return self.method, self.data
 
23
    def transform(self, size, image, **options):
 
24
        # can be overridden
 
25
        method, data = self.getdata()
 
26
        return image.transform(size, method, data, **options)
23
27
 
24
28
##
25
29
# Define an affine image transform.