WIP Lib 2.37 - databases created by ModernKeepass work fine, but no interoperability...

This commit is contained in:
2017-10-23 18:48:46 +02:00
committed by BONNEVILLE Geoffroy
parent 2bbd931b1a
commit 5b31d3ff72
30 changed files with 250 additions and 244 deletions

View File

@@ -0,0 +1,22 @@
using System.IO;
using System.Threading.Tasks;
using Splat;
namespace ModernKeePassLib.Utility
{
public class GfxUtil
{
public static async Task<IBitmap> LoadImage(byte[] pb)
{
return await ScaleImage(pb, null, null);
}
public static async Task<IBitmap> ScaleImage(byte[] pb, int? w, int? h)
{
using (var ms = new MemoryStream(pb, false))
{
return await BitmapLoader.Current.Load(ms, w, h);
}
}
}
}