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();
}
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();
}