Browse Source

Merge branch 'main' into stefannikolei/mac

pull/2384/head
James Jackson-South 3 years ago
committed by GitHub
parent
commit
182779432d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/ImageSharp/Formats/ImageFormatManager.cs

4
src/ImageSharp/Formats/ImageFormatManager.cs

@ -102,9 +102,7 @@ public class ImageFormatManager
/// <returns><see langword="true"/> if a match is found; otherwise, <see langword="false"/></returns>
public bool TryFindFormatByFileExtension(string extension, [NotNullWhen(true)] out IImageFormat? format)
{
Guard.NotNullOrWhiteSpace(extension, nameof(extension));
if (extension[0] == '.')
if (!string.IsNullOrWhiteSpace(extension) && extension[0] == '.')
{
extension = extension[1..];
}

Loading…
Cancel
Save