diff --git a/DownKyi.Core/Storage/StorageCover.cs b/DownKyi.Core/Storage/StorageCover.cs index dc4e69b..892491d 100644 --- a/DownKyi.Core/Storage/StorageCover.cs +++ b/DownKyi.Core/Storage/StorageCover.cs @@ -59,7 +59,7 @@ namespace DownKyi.Core.Storage byte[] bytes = File.ReadAllBytes(cover); Imazen.WebP.Extern.LoadLibrary.LoadWebPOrFail(); SimpleDecoder simpleDecoder = new SimpleDecoder(); - Bitmap bitmap = simpleDecoder.DecodeFromBytes(bytes, bytes.Length); + Bitmap bitmap = simpleDecoder.DecodeFromBytes(bytes, bytes.LongLength); Image thumbnail = bitmap.GetThumbnailImage(width, height, null, IntPtr.Zero); diff --git a/DownKyi.Core/Storage/StorageHeader.cs b/DownKyi.Core/Storage/StorageHeader.cs index b988269..bc7ec4c 100644 --- a/DownKyi.Core/Storage/StorageHeader.cs +++ b/DownKyi.Core/Storage/StorageHeader.cs @@ -59,7 +59,7 @@ namespace DownKyi.Core.Storage byte[] bytes = File.ReadAllBytes(header); Imazen.WebP.Extern.LoadLibrary.LoadWebPOrFail(); SimpleDecoder simpleDecoder = new SimpleDecoder(); - Bitmap bitmap = simpleDecoder.DecodeFromBytes(bytes, bytes.Length); + Bitmap bitmap = simpleDecoder.DecodeFromBytes(bytes, bytes.LongLength); Image thumbnail = bitmap.GetThumbnailImage(width, height, null, IntPtr.Zero);