-
Notifications
You must be signed in to change notification settings - Fork 159
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
photon::transform additions #179
Conversation
I just removed the content-aware crop, ultimately leaving the cropping of the resultant image to the user (in line with previous behavior). After some personal testing, I realized that it sometimes cuts too aggressively, especially on small images with concave sections of alpha. Other than that, everything appears to work correctly. |
I just fixed the Rustfmt issues and synced the recent |
@volbot It appears the rustfmt test isn't passing, could you run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@volbot That's great, thanks very much again for your excellent contribution! It's greatly appreciated. I'm delighted that the library will have the new rotation implementation, as well as the added shear
functions. 🎉 Everything looks good to me, so I'm going to merge this ✅
Changes:
1. Added
transform::{shearx, sheary}
; added example (examples/shear.rs
)Note: The change to image size is a lot more drastic than before, and pretty much any usage/implementation will need some kind of cropping function.
2. Rewrote
transform::rotate
to use Paeth rotation; added interpolation; added example (examples/rotate.rs
)Resolves: #170 #178
Note: Slightly less performant than previously. This could hypothetically be faster if all three shears were incorporated into a single loop, but the extra considerations needed in order to properly interpolate made the gains paltry in every case I tried.
3. Changed signature of
transform::crop
to not require a mutable referenceResolves: #177