aboutsummaryrefslogtreecommitdiff
path: root/Emby.Drawing/ImageProcessor.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-08-02 15:08:55 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-08-02 15:08:55 -0400
commit47b1a4cafd0cc1882503e46fb8a5082a3b061078 (patch)
treec3bc12ad2abcec38aa254ae5c1354b762ad4e38a /Emby.Drawing/ImageProcessor.cs
parent6d13cec38ed243a8bc133c52a167e23eac01aae6 (diff)
update image processing
Diffstat (limited to 'Emby.Drawing/ImageProcessor.cs')
-rw-r--r--Emby.Drawing/ImageProcessor.cs16
1 files changed, 15 insertions, 1 deletions
diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs
index 1e4537bae..9db2c1c20 100644
--- a/Emby.Drawing/ImageProcessor.cs
+++ b/Emby.Drawing/ImageProcessor.cs
@@ -189,7 +189,21 @@ namespace Emby.Drawing
dateModified = tuple.Item2;
}
- var originalImageSize = GetImageSize(originalImagePath, dateModified);
+ ImageSize originalImageSize;
+
+ try
+ {
+ originalImageSize = GetImageSize(originalImagePath, dateModified);
+ }
+ catch
+ {
+ // This is an arbitrary default, but don't fail the whole process over this
+ originalImageSize = new ImageSize
+ {
+ Width = 100,
+ Height = 100
+ };
+ }
// Determine the output size based on incoming parameters
var newSize = DrawingUtils.Resize(originalImageSize, options.Width, options.Height, options.MaxWidth, options.MaxHeight);