Scale images to integer heights

This commit is contained in:
Christoph Hagen
2022-09-16 15:32:55 +02:00
parent 9e6ee2c499
commit c727bdf91e
2 changed files with 2 additions and 2 deletions

View File

@ -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)
}
}