aboutsummaryrefslogtreecommitdiff
path: root/Emby.Drawing/ImageProcessor.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-09-15 00:31:12 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-09-15 00:31:12 -0400
commit6d3fda8693eea57384461e58b112268288ef77b7 (patch)
tree0006e357279cd16fe63dd7ec51b7e90dc34db068 /Emby.Drawing/ImageProcessor.cs
parent4c050bc3f8a7b7a1e1d312bc4cdd9eacdd8365a3 (diff)
more client sync stubs
Diffstat (limited to 'Emby.Drawing/ImageProcessor.cs')
-rw-r--r--Emby.Drawing/ImageProcessor.cs27
1 files changed, 18 insertions, 9 deletions
diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs
index 3faa3e3e9..471037801 100644
--- a/Emby.Drawing/ImageProcessor.cs
+++ b/Emby.Drawing/ImageProcessor.cs
@@ -16,6 +16,7 @@ using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
+using Emby.Drawing.Common;
namespace Emby.Drawing
{
@@ -414,18 +415,26 @@ namespace Emby.Drawing
/// <returns>ImageSize.</returns>
private ImageSize GetImageSizeInternal(string path, bool allowSlowMethod)
{
- using (var file = TagLib.File.Create(path))
+ try
{
- var image = file as TagLib.Image.File;
-
- var properties = image.Properties;
-
- return new ImageSize
+ using (var file = TagLib.File.Create(path))
{
- Height = properties.PhotoHeight,
- Width = properties.PhotoWidth
- };
+ var image = file as TagLib.Image.File;
+
+ var properties = image.Properties;
+
+ return new ImageSize
+ {
+ Height = properties.PhotoHeight,
+ Width = properties.PhotoWidth
+ };
+ }
+ }
+ catch
+ {
}
+
+ return ImageHeader.GetDimensions(path, _logger, _fileSystem);
}
private readonly Timer _saveImageSizeTimer;