Scale images to integer heights
This commit is contained in:
@ -12,7 +12,7 @@ extension NSSize {
|
||||
return self
|
||||
}
|
||||
|
||||
let height = height * desiredWidth / width
|
||||
let height = (height * desiredWidth / width).rounded(.down)
|
||||
return NSSize(width: desiredWidth, height: height)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user