Merge pull request #11127 from crobibero/skia-blurhash

Don't attempt to calculate blurhash for svg
pull/11160/head
Claus Vium 8 months ago committed by GitHub
commit 1e964c9bc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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;

Loading…
Cancel
Save