mirror of
https://github.com/wismna/ModernKeePassLib.git
synced 2025-10-03 15:40:20 -04:00
22 lines
563 B
C#
22 lines
563 B
C#
|
|
using SixLabors.ImageSharp;
|
|
using SixLabors.ImageSharp.PixelFormats;
|
|
using SixLabors.ImageSharp.Processing;
|
|
|
|
namespace ModernKeePassLib.Utility
|
|
{
|
|
public class GfxUtil
|
|
{
|
|
public static Image<Rgba32> LoadImage(byte[] pb)
|
|
{
|
|
return Image.Load<Rgba32>(pb);
|
|
}
|
|
|
|
public static Image<Rgba32> ScaleImage(Image<Rgba32> m_imgOrg, int? w, int? h, ScaleTransformFlags flags)
|
|
{
|
|
m_imgOrg.Mutate(i => i.Resize(w.GetValueOrDefault(), h.GetValueOrDefault()));
|
|
return m_imgOrg;
|
|
}
|
|
}
|
|
}
|