3.0.5416.0

This commit is contained in:
Luke Pulverenti
2014-10-31 00:57:24 -04:00
parent a32fd710a9
commit 7a4d5b7951
79 changed files with 8961 additions and 8643 deletions

View File

@@ -213,7 +213,7 @@ namespace MediaBrowser.Server.Implementations.Drawing
var newHeight = Convert.ToInt32(newSize.Height);
var selectedOutputFormat = options.OutputFormat == ImageOutputFormat.Webp && !_webpAvailable
? ImageOutputFormat.Png
? GetFallbackImageFormat(originalImagePath)
: options.OutputFormat;
// Graphics.FromImage will throw an exception if the PixelFormat is Indexed, so we need to handle that here
@@ -279,6 +279,11 @@ namespace MediaBrowser.Server.Implementations.Drawing
}
}
private ImageOutputFormat GetFallbackImageFormat(string originalImagePath)
{
return ImageOutputFormat.Png;
}
private void SaveToWebP(Bitmap thumbnail, Stream toStream, int quality)
{
new SimpleEncoder().Encode(thumbnail, toStream, quality);