Merge pull request #11127 from crobibero/skia-blurhash

Don't attempt to calculate blurhash for svg
This commit is contained in:
Claus Vium 2024-03-15 13:26:27 +01:00 committed by GitHub
commit 1e964c9bc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -188,7 +188,8 @@ public class SkiaEncoder : IImageEncoder
ArgumentException.ThrowIfNullOrEmpty(path);
var extension = Path.GetExtension(path.AsSpan()).TrimStart('.');
if (!SupportedInputFormats.Contains(extension, StringComparison.OrdinalIgnoreCase))
if (!SupportedInputFormats.Contains(extension, StringComparison.OrdinalIgnoreCase)
|| extension.Equals(SvgFormat, StringComparison.OrdinalIgnoreCase))
{
_logger.LogDebug("Unable to compute blur hash due to unsupported format: {ImagePath}", path);
return string.Empty;