support video_ts.nfo

This commit is contained in:
Luke Pulverenti
2015-05-15 11:46:20 -04:00
parent 2189851f11
commit d2949d6e03
13 changed files with 103 additions and 72 deletions

View File

@@ -115,9 +115,16 @@ namespace Emby.Drawing.ImageMagick
}
}
private bool HasTransparency(string path)
{
var ext = Path.GetExtension(path);
return string.Equals(ext, ".png", StringComparison.OrdinalIgnoreCase);
}
public void EncodeImage(string inputPath, string outputPath, int width, int height, int quality, ImageProcessingOptions options)
{
if (string.IsNullOrWhiteSpace(options.BackgroundColor))
if (string.IsNullOrWhiteSpace(options.BackgroundColor) && !HasTransparency(inputPath))
{
using (var originalImage = new MagickWand(inputPath))
{