mirror of
https://github.com/DarthAffe/HPPH.git
synced 2025-12-12 13:28:37 +00:00
18 lines
394 B
C#
18 lines
394 B
C#
using SkiaSharp;
|
|
|
|
namespace HPPH.SkiaSharp;
|
|
|
|
public static class ImageHelper
|
|
{
|
|
public static IImage LoadImage(string path)
|
|
{
|
|
using SKImage image = SKImage.FromEncodedData(path);
|
|
return image.ToImage();
|
|
}
|
|
|
|
public static IImage LoadImage(Stream stream)
|
|
{
|
|
using SKImage image = SKImage.FromEncodedData(stream);
|
|
return image.ToImage();
|
|
}
|
|
} |