File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Plugins/Flow.Launcher.Plugin.BrowserBookmark Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,8 @@ ORDER BY i.width DESC
162
162
163
163
if ( imageData is not { Length : > 0 } )
164
164
return ;
165
-
165
+
166
+ // Check if the image data is compressed (GZip)
166
167
if ( imageData . Length > 2 && imageData [ 0 ] == 0x1f && imageData [ 1 ] == 0x8b )
167
168
{
168
169
using var inputStream = new MemoryStream ( imageData ) ;
@@ -171,9 +172,9 @@ ORDER BY i.width DESC
171
172
gZipStream . CopyTo ( outputStream ) ;
172
173
imageData = outputStream . ToArray ( ) ;
173
174
}
174
-
175
+
176
+ // Convert the image data to WebP format
175
177
var webpData = FaviconHelper . TryConvertToWebp ( imageData ) ;
176
-
177
178
if ( webpData != null )
178
179
{
179
180
var faviconPath = Path . Combine ( _faviconCacheDir , $ "firefox_{ domain } _{ iconId } .webp") ;
Original file line number Diff line number Diff line change @@ -121,4 +121,4 @@ public static byte[] TryConvertToWebp(byte[] data)
121
121
122
122
return null ;
123
123
}
124
- }
124
+ }
You can’t perform that action at this time.
0 commit comments