aboutsummaryrefslogtreecommitdiff
path: root/Emby.Drawing
diff options
context:
space:
mode:
authorErwin de Haan <EraYaN@users.noreply.github.com>2019-01-13 21:59:37 +0100
committerGitHub <noreply@github.com>2019-01-13 21:59:37 +0100
commit9d0a08571e18328e6d24e4611bab386aa5a25d29 (patch)
treebc9ffac0ffd5c4e3092af1026bee58dc66f21775 /Emby.Drawing
parent23f5c1d90b8d1e8baac7c20fd01a391cacd5c60a (diff)
parentf8dd182e422db49d98cc090f4e205cc46517f610 (diff)
Merge branch 'dev' into reformat
Diffstat (limited to 'Emby.Drawing')
-rw-r--r--Emby.Drawing/Common/ImageHeader.cs9
1 files changed, 5 insertions, 4 deletions
diff --git a/Emby.Drawing/Common/ImageHeader.cs b/Emby.Drawing/Common/ImageHeader.cs
index 3939a1664..c08cdabb2 100644
--- a/Emby.Drawing/Common/ImageHeader.cs
+++ b/Emby.Drawing/Common/ImageHeader.cs
@@ -48,12 +48,13 @@ namespace Emby.Drawing.Common
/// <exception cref="ArgumentException">The image was of an unrecognised format.</exception>
public static ImageSize GetDimensions(string path, ILogger logger, IFileSystem fileSystem)
{
- var extension = Path.GetExtension(path);
-
- if (string.IsNullOrEmpty(extension))
+ if (string.IsNullOrEmpty(path))
{
- throw new ArgumentException("ImageHeader doesn't support image file");
+ throw new ArgumentNullException(nameof(path));
}
+
+ string extension = Path.GetExtension(path).ToLower();
+
if (!SupportedExtensions.Contains(extension))
{
throw new ArgumentException("ImageHeader doesn't support " + extension);