-
Notifications
You must be signed in to change notification settings - Fork 37
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
When i apply a transform to an image, it shrinks the image. #22
Comments
When I transform the eyes, I want only the eyes to be transformed, not the entire image. |
Hey there! And thank you for your interest! That is actually a great question:) Anyway, possible solutions
I would go for the first option:) Hope that helps:) |
Thank you for answer. Do you know how to prevent the pixels on the edges from being deformed? |
Well, you would need to modify the source code. See below exactly the lines which implement the "fixed points" logic. Currently, it only "anchors" the 4 corners. Lines 60 to 68 in 3d7916f
See below a sketch of a possible change I guess you would have to play around and experiment a bit and see for yourself. You can add as many fixed points as you want. Note that by specifying these fixed points you are basically forcing the displacement at those given points to be 0. Hope that makes sense:) |
Transforming by adding anchor points at 50px spacing to each corner solved the problem. Thank you so very much.
|
Great! |
code
original image
applied imgae
If you look at the top side of the applied image, the image is scaled down with a black area.
Is it possible to transform a face without this being made?
https://pychubby.readthedocs.io/en/latest/source/gallery.html
If you look at the LinearTransform gif on the pychubby official website, you will see the same phenomenon.
Thanks for providing a good reference.
The text was updated successfully, but these errors were encountered: