diff --git a/src/Texture.cs b/src/Texture.cs index 5c34033..cec57d2 100644 --- a/src/Texture.cs +++ b/src/Texture.cs @@ -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,