杨锴
2025-04-16 09a372bc45fde16fd42257ab6f78b8deeecf720b
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