This commit is contained in:
Luke Pulverenti
2017-09-05 15:49:02 -04:00
parent 3b318a3add
commit 49b799adbe
69 changed files with 207 additions and 187 deletions

View File

@@ -193,30 +193,31 @@ namespace Emby.Drawing.Skia
{
using (var stream = new SKFileStream(path))
{
var codec = SKCodec.Create(stream);
if (codec == null)
using (var codec = SKCodec.Create(stream))
{
origin = SKCodecOrigin.TopLeft;
return null;
if (codec == null)
{
origin = SKCodecOrigin.TopLeft;
return null;
}
// create the bitmap
var bitmap = new SKBitmap(codec.Info.Width, codec.Info.Height, !requiresTransparencyHack);
if (bitmap != null)
{
// decode
codec.GetPixels(bitmap.Info, bitmap.GetPixels());
origin = codec.Origin;
}
else
{
origin = SKCodecOrigin.TopLeft;
}
return bitmap;
}
// create the bitmap
var bitmap = new SKBitmap(codec.Info.Width, codec.Info.Height, !requiresTransparencyHack);
if (bitmap != null)
{
// decode
codec.GetPixels(bitmap.Info, bitmap.GetPixels());
origin = codec.Origin;
}
else
{
origin = SKCodecOrigin.TopLeft;
}
return bitmap;
}
}
@@ -593,10 +594,6 @@ namespace Emby.Drawing.Skia
get { return "Skia"; }
}
public void Dispose()
{
}
public bool SupportsImageCollageCreation
{
get { return true; }