我正在学习使用 ImageSharp的教程( https://opentk.net/learn/chapter1/4-textures.html )。如何将类型“ImageSharp.Image”转换为“ImageSharp.PixelFormats.Rgba32”?
要加载图像,我正在使用
Image<Rgba32> image = Image.Load(path);
但我不断收到错误:
Cannot implicitly convert type 'SixLabors.ImageSharp.Image' to 'SixLabors.ImageSharp.Image<SixLabors.ImageSharp.PixelFormats.Rgba32>'. An explicit conversion exists (are you missing a cast?).