杨锴
2025-03-11 90dc3329d1973fda691e357cf4523d5c7c67fa1d
Pods/SwifterSwift/Sources/SwifterSwift/AppKit/NSImageExtensions.swift
@@ -17,13 +17,12 @@
        guard imageHeight > 0 else { return self }
        // Get ratio (landscape or portrait)
        let ratio: CGFloat
        if imageWidth > imageHeight {
        let ratio: CGFloat = if imageWidth > imageHeight {
            // Landscape
            ratio = maxSize.width / imageWidth
            maxSize.width / imageWidth
        } else {
            // Portrait
            ratio = maxSize.height / imageHeight
            maxSize.height / imageHeight
        }
        // Calculate new size based on the ratio