2
0
Эх сурвалжийг харах

Update BlurHashSharp and set max size to 128x128

cvium 4 жил өмнө
parent
commit
af274de77e

+ 2 - 2
Jellyfin.Drawing.Skia/Jellyfin.Drawing.Skia.csproj

@@ -18,8 +18,8 @@
   </ItemGroup>
 
   <ItemGroup>
-    <PackageReference Include="BlurHashSharp" Version="1.0.1" />
-    <PackageReference Include="BlurHashSharp.SkiaSharp" Version="1.0.0" />
+    <PackageReference Include="BlurHashSharp" Version="1.1.0" />
+    <PackageReference Include="BlurHashSharp.SkiaSharp" Version="1.1.0" />
     <PackageReference Include="SkiaSharp" Version="1.68.3" />
     <PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="1.68.3" />
     <PackageReference Include="Jellyfin.SkiaSharp.NativeAssets.LinuxArm" Version="1.68.1" />

+ 2 - 1
Jellyfin.Drawing.Skia/SkiaEncoder.cs

@@ -199,7 +199,8 @@ namespace Jellyfin.Drawing.Skia
                 throw new ArgumentNullException(nameof(path));
             }
 
-            return BlurHashEncoder.Encode(xComp, yComp, path);
+            // Any larger than 128x128 is too slow and there's no visually discernible difference
+            return BlurHashEncoder.Encode(xComp, yComp, path, 128, 128);
         }
 
         private static bool HasDiacritics(string text)