我正在使用 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?).