Fix rendering bug with some favicons. Use proper scaling factor and avoid converting to TIFF.

This commit is contained in:
Brent Simmons committed 2025-09-09 20:53:17 -07:00
1 parent 0c83ce21ef
commit cbbd2c3f4b
2 files changed
+9 -7

No files matched your search

@@ -10,7 +10,10 @@
import AppKit
public class RSScreen {
public static var maxScreenScale = CGFloat(2)
public static var maxScreenScale: CGFloat {
NSScreen.screens.map(\.backingScaleFactor).max() ?? 2.0
}
}
#endif
+5 -6
View File
@@ -102,12 +102,11 @@ final class FaviconDownloader {
return image
}
if let iconImage = favicon(for: webFeed), let imageData = iconImage.image.dataRepresentation() {
if let scaledImage = RSImage.scaledForIcon(imageData) {
let scaledIconImage = IconImage(scaledImage)
cache[webFeed] = scaledIconImage
return scaledIconImage
}
if let iconImage = favicon(for: webFeed) {
// Skip the data conversion roundtrip that can introduce artifacts
// Use the original image directly for better quality
cache[webFeed] = iconImage
return iconImage
}
return nil