-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Adding Aspect Fit/Fill to Image Resizing Processor #597
Comments
Hi, thanks for considering contributing! That's great if you could implement it! I think just extending the Since it should not be a breaking change, so please add this as an option and keep current implementation for default using. Currently, the input size will be respected without aspect fitting or filling. So I guess just add an enum in the struct ResizingImageProcessor {
enum ContentMode {
case none // This will be the default one
case aspectFit
case aspectFill
}
init(targetSize: CGSize, mode: ContentMode = .none) { ... }
} How do you think about it? |
Hi @onevcat, @TimOliver, I just had to implement this feature this morning for my project functional scope. Let me know |
👍 @Drusy It's great to hear that you are interested in it too. I'd like to receive a p-r from you! However, since @TimOliver was earlier and might be still working on this, let's keep for a while to see Tim's comment now. :) |
@onevcat of course, keep me updated :) |
@TimOliver Great! Thank you. @Drusy :) |
added #599 |
@onevcat After reading @BrikerMan PR, I actually didn't know the existence of a such method Here is my PR #600 for this feature using your size proxy (no UIKit) |
@TimOliver @BrikerMan @Drusy Thank you all! #600 was merged and I will prepare a release for it later today.
|
Awesome! Great work all! :D |
Hi @onevcat!
Thanks for this awesome library! It's really impressive! :)
I was playing with the
ResizingImageProcessor
in my app to resize images preload in aUITableView
, and there were 2 resizing modes I was looking to use:targetSize
, with the outlying edges getting cropped.I'd be happy to volunteer to add these. If you'd like that, would it be worth extending
ResizingImageProcessor
, or making them separate structs?Thanks!
The text was updated successfully, but these errors were encountered: