add SavePNG method

main
cosmonaut 2021-01-15 19:42:31 -08:00
parent add8c8ed40
commit a3daa49228
1 changed files with 8 additions and 0 deletions

View File

@ -39,6 +39,14 @@ namespace Campari
return texture;
}
public unsafe static void SavePNG(string path, int width, int height, byte[] pixels)
{
fixed (byte* ptr = &pixels[0])
{
Refresh.Refresh_Image_SavePNG(path, width, height, (IntPtr) ptr);
}
}
public static Texture CreateTexture2D(
GraphicsDevice device,
uint width,