朋友您好我正在使用 SkiaSharp 库,我收到一个错误,由于我的研究,我找不到解决方案,请提前感谢您的帮助。
错误
'SkiaSharp.SKImageInfo'的类型初始值设定项引发异常
public class HomeController : Controller
{
// GET: Home
public ActionResult Index()
{
var t = new SkiaSharpLib().OK();
if (t)
{
return View("OK");
}
return View("HATA");
}
public class SkiaSharpLib
{
public bool OK()
{
try
{
using (var surface = SKSurface.Create(width: 640, height: 480, SKColorType.Alpha8, SKAlphaType.Premul))
{
SKCanvas myCanvas = surface.Canvas;
return true;
}
}
catch (Exception ex)
{
return false;
}
}
}