Browse Source
Merge branch 'main' into stefannikolei/mac
pull/2384/head
James Jackson-South
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
3 deletions
-
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..]; |
|
|
|
} |
|
|
|
|