safari image fix

This commit is contained in:
Luke Pulverenti
2015-05-15 12:32:50 -04:00
parent 41a63028f1
commit b54b906c1a
3 changed files with 8 additions and 5 deletions

View File

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