diff --git a/src/Refresh.cs b/src/Refresh.cs index fe5aca1..fee0458 100644 --- a/src/Refresh.cs +++ b/src/Refresh.cs @@ -36,7 +36,7 @@ namespace RefreshCS /* Version */ public const uint REFRESH_MAJOR_VERSION = 1; - public const uint REFRESH_MINOR_VERSION = 11; + public const uint REFRESH_MINOR_VERSION = 12; public const uint REFRESH_PATCH_VERSION = 0; public const uint REFRESH_COMPILED_VERSION = ( @@ -976,7 +976,7 @@ namespace RefreshCS ); [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern IntPtr Refresh_Image_Load( + public static extern IntPtr Refresh_Image_LoadPNGFromFile( [MarshalAs(UnmanagedType.LPStr)] string filename, out int width, out int height, @@ -984,10 +984,37 @@ namespace RefreshCS ); [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] - public static extern void Refresh_Image_Free( - IntPtr mem + public static extern IntPtr Refresh_Image_LoadPNGFromMemory( + IntPtr buffer, + int bufferLength, + out int width, + out int height, + out int numChannels ); + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern void Refresh_Image_FreePNG(IntPtr mem); + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr Refresh_Image_LoadQOIFromFile( + [MarshalAs(UnmanagedType.LPStr)] string filename, + out int width, + out int height, + out int numChannels + ); + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr Refresh_Image_LoadQOIFromMemory( + IntPtr buffer, + int bufferLength, + out int width, + out int height, + out int numChannels + ); + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern void Refresh_Image_FreeQOI(IntPtr mem); + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] public static extern void Refresh_Image_SavePNG( [MarshalAs(UnmanagedType.LPStr)] string filename, @@ -996,5 +1023,13 @@ namespace RefreshCS byte bgra, IntPtr data ); + + [DllImport(nativeLibName, CallingConvention = CallingConvention.Cdecl)] + public static extern void Refresh_Image_SaveQOI( + [MarshalAs(UnmanagedType.LPStr)] string filename, + int w, + int h, + IntPtr data + ); } }