Improved image processing

This commit is contained in:
LukePulverenti Luke Pulverenti luke pulverenti
2012-09-18 17:39:42 -04:00
parent 8b7effd6ff
commit e76ff3bf16
4 changed files with 80 additions and 13 deletions

View File

@@ -1,4 +1,5 @@
using MediaBrowser.Common.Logging;
using System.Drawing.Imaging;
using MediaBrowser.Common.Logging;
using MediaBrowser.Common.Net;
using MediaBrowser.Common.Net.Handlers;
using MediaBrowser.Controller;
@@ -128,6 +129,11 @@ namespace MediaBrowser.Api.HttpHandlers
return null;
}
if (Kernel.Instance.ImageProcessors.Any(i => i.RequiresTransparency))
{
return MimeTypes.GetMimeType(".png");
}
return MimeTypes.GetMimeType(await GetImagePath().ConfigureAwait(false));
}