Delete some unused code.

This commit is contained in:
Brent Simmons
2025-02-02 10:57:26 -08:00
parent 510f0b20ec
commit 57cf732f5a
5 changed files with 8 additions and 91 deletions

View File

@@ -17,12 +17,19 @@ extension RSImage {
static let maxIconSize = 48
#if os(macOS)
static let maxScreenScale = CGFloat(2)
#elseif os(iOS)
static let maxScreenScale = CGFloat(3)
#endif
static func scaledForIcon(_ data: Data, imageResultBlock: @escaping ImageResultBlock) {
IconScalerQueue.shared.scaledForIcon(data, imageResultBlock)
}
static func scaledForIcon(_ data: Data) -> RSImage? {
let scaledMaxPixelSize = Int(ceil(CGFloat(RSImage.maxIconSize) * RSScreen.maxScreenScale))
let scaledMaxPixelSize = Int(ceil(CGFloat(RSImage.maxIconSize) * Self.maxScreenScale))
guard var cgImage = RSImage.scaleImage(data, maxPixelSize: scaledMaxPixelSize) else {
return nil
}