-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Affine transformation may be incorrect #8731
Comments
Hi. If I consider your change request from purely the perspective of the code, then Pillow/src/libImaging/Geometry.c Lines 1017 to 1024 in 2810d7c
The documentation for
So again, there is no data at the 6th offset - but hopefully that documentation clarifies the operation that is happening. I understand though that you're just thinking about matrices. You may find https://stackabuse.com/affine-image-transformations-in-python-with-numpy-pillow-and-opencv/#affinetransformationswithpillow useful information, or https://stackoverflow.com/questions/17056209/python-pil-affine-transformation. |
I found this sentence in the documentation of scipy's affine transformation. I believe the PIL documentation should also include this sentence.
|
Could you explain your request in some more detail?
|
|
I've created #8735 to mention that it is the inverse matrix that is used. Regarding a way to do this without the inverse, I think it only makes sense to explain that if you're using a 3x3 matrix, and describing the process of inverting the matrix, while still emphasising that it is only the first six values are used, sounds like it would only create further confusion. |
File:
Pillow/src/libImaging/Geometry.c
, Line: 1083, in functionImagingTransformAffine
Pillow/src/libImaging/Geometry.c
Lines 1083 to 1084 in 2810d7c
The inverse matrix corresponding to array
double a[6]
should be used for the computation.The text was updated successfully, but these errors were encountered: