小编Tia*_*nan的帖子

将 ImageSharp.Image 转换为 ImageSharp.PixelFormats.Rgba32?

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

c# rgba opentk imagesharp

5
推荐指数
1
解决办法
1552
查看次数

标签 统计

c# ×1

imagesharp ×1

opentk ×1

rgba ×1