We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6ec1692 + 1ccad09 commit da5b556Copy full SHA for da5b556
src/ImageSharp/Formats/ImageFormatManager.cs
@@ -102,9 +102,7 @@ public void AddImageFormat(IImageFormat format)
102
/// <returns><see langword="true"/> if a match is found; otherwise, <see langword="false"/></returns>
103
public bool TryFindFormatByFileExtension(string extension, [NotNullWhen(true)] out IImageFormat? format)
104
{
105
- Guard.NotNullOrWhiteSpace(extension, nameof(extension));
106
-
107
- if (extension[0] == '.')
+ if (!string.IsNullOrWhiteSpace(extension) && extension[0] == '.')
108
109
extension = extension[1..];
110
}
0 commit comments