-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add scaled(toMaxSize:NSSize) to NSImage, including a test #291
Conversation
Generated by 🚫 Danger |
Codecov Report
@@ Coverage Diff @@
## master #291 +/- ##
==========================================
+ Coverage 94.41% 94.56% +0.15%
==========================================
Files 99 100 +1
Lines 5494 5555 +61
==========================================
+ Hits 5187 5253 +66
+ Misses 307 302 -5
Continue to review full report at Codecov.
|
/// | ||
/// - Parameter toMaxSize: maximum size | ||
/// - Returns: scaled NSImage | ||
public func scaled(toMaxSize: NSSize) -> NSImage { |
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.
public func scaled(to maxSize: NSSize) -> NSImage
may be better?
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.
actually maybe not, loses the expressiveness of it being a max size.
Thank you for your contribution @buddax2. Can you add a |
@SD10 sure I can. Should I add a new release section for this (v4.0.2)? |
Sure things @buddax2 👍 |
@SD10 done |
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.
Thank you for your contribution @buddax2 Sorry for the delay!
Add a function to NSImage to be able to scale an image to some maximum size. It could be useful for creating thumbnails.
Checklist