Silk.NETS
Silk.NETโ€ข4y agoโ€ข
51 replies
bjr29

ImageSharp thing

(Sorry for butting in) So I'm trying to load a texture from path, but I get this error:

public unsafe Texture(string path) {
    Image<Rgba32> image = (Image<Rgba32>) Image.Load(path);

    fixed (void* data = MemoryMarshal.GetReference(image.DangerousGetPixelRowMemory(0))) {
        Load(data, (uint) image.Width, (uint) image.Height);
    }

    image.Dispose();
}
unknown.png
Was this page helpful?