Skip to content

Commit

Permalink
Updated AffineTransform docstring to mention it uses the inverse matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Feb 6, 2025
1 parent 2810d7c commit 41861e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/PIL/ImageTransform.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ class AffineTransform(Transform):
Define an affine image transform.
This function takes a 6-tuple (a, b, c, d, e, f) which contain the first
two rows from an affine transform matrix. For each pixel (x, y) in the
output image, the new value is taken from a position (a x + b y + c,
d x + e y + f) in the input image, rounded to nearest pixel.
two rows from the inverse of an affine transform matrix. For each pixel
(x, y) in the output image, the new value is taken from a position (a x +
b y + c, d x + e y + f) in the input image, rounded to nearest pixel.
This function can be used to scale, translate, rotate, and shear the
original image.
See :py:meth:`.Image.transform`
:param matrix: A 6-tuple (a, b, c, d, e, f) containing the first two rows
from an affine transform matrix.
from the inverse of an affine transform matrix.
"""

method = Image.Transform.AFFINE
Expand Down

0 comments on commit 41861e8

Please sign in to comment.