diff options
Diffstat (limited to 'Emby.Drawing/ImageProcessor.cs')
| -rw-r--r-- | Emby.Drawing/ImageProcessor.cs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs index 05c156e6a..9d7d1dbe9 100644 --- a/Emby.Drawing/ImageProcessor.cs +++ b/Emby.Drawing/ImageProcessor.cs @@ -110,6 +110,15 @@ namespace Emby.Drawing } } + + public bool SupportsImageCollageCreation + { + get + { + return _imageEncoder.SupportsImageCollageCreation; + } + } + private string ResizedImageCachePath { get @@ -170,6 +179,11 @@ namespace Emby.Drawing var originalImagePath = originalImage.Path; + if (!_imageEncoder.SupportsImageEncoding) + { + return originalImagePath; + } + if (options.HasDefaultOptions(originalImagePath) && options.Enhancers.Count == 0 && !options.CropWhiteSpace) { // Just spit out the original file if all the options are default @@ -178,7 +192,7 @@ namespace Emby.Drawing var dateModified = originalImage.DateModified; - if (options.CropWhiteSpace) + if (options.CropWhiteSpace && _imageEncoder.SupportsImageEncoding) { var tuple = await GetWhitespaceCroppedImage(originalImagePath, dateModified).ConfigureAwait(false); @@ -295,6 +309,11 @@ namespace Emby.Drawing _imageEncoder.CropWhiteSpace(originalImagePath, croppedImagePath); } + catch (NotImplementedException) + { + // No need to spam the log with an error message + return new Tuple<string, DateTime>(originalImagePath, dateModified); + } catch (Exception ex) { // We have to have a catch-all here because some of the .net image methods throw a plain old Exception |
