The Free Software Media System - Server Backend & API
update skia
Luke Pulverenti3c604453118e
diff --git a/Emby.Drawing.Skia/SkiaEncoder.cs b/Emby.Drawing.Skia/SkiaEncoder.csindex d52ad47349..64c2afe0eb 100644--- a/Emby.Drawing.Skia/SkiaEncoder.cs+++ b/Emby.Drawing.Skia/SkiaEncoder.cs@@ -192,17 +192,32 @@ namespace Emby.Drawing.Skia}}+ private SKBitmap Decode(string path)+ {+ using (var stream = new SKFileStream(path))+ {+ var codec = SKCodec.Create(stream);++ // create the bitmap+ var bitmap = new SKBitmap(codec.Info.Width, codec.Info.Height);+ // decode+ codec.GetPixels(bitmap.Info, bitmap.GetPixels());++ return bitmap;+ }+ }+private SKBitmap GetBitmap(string path, bool cropWhitespace){if (cropWhitespace){- using (var bitmap = SKBitmap.Decode(path))+ using (var bitmap = Decode(path)){return CropWhiteSpace(bitmap);}}- return SKBitmap.Decode(path);+ return Decode(path);}public void EncodeImage(string inputPath, string outputPath, bool autoOrient, int width, int height, int quality, ImageProcessingOptions options, ImageFormat selectedOutputFormat)diff --git a/MediaBrowser.ServerApplication/ImageEncoderHelper.cs b/MediaBrowser.ServerApplication/ImageEncoderHelper.csindex 99ccdbbe87..8c3d8d2130 100644--- a/MediaBrowser.ServerApplication/ImageEncoderHelper.cs+++ b/MediaBrowser.ServerApplication/ImageEncoderHelper.cs@@ -26,7 +26,7 @@ namespace MediaBrowser.Server.Startup.Common{try{- //return new SkiaEncoder(logManager.GetLogger("ImageMagick"), appPaths, httpClient, fileSystem);+ return new SkiaEncoder(logManager.GetLogger("ImageMagick"), appPaths, httpClient, fileSystem);}catch{