update image processing

This commit is contained in:
Luke Pulverenti
2015-08-02 15:08:55 -04:00
parent 6d13cec38e
commit 47b1a4cafd
20 changed files with 72 additions and 25 deletions

View File

@@ -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);