cosmonaut 2023-04-03 17:27:34 -07:00
parent 10f54d6b03
commit fb5fee5f56
1 changed files with 39 additions and 4 deletions

View File

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