From: Mario Daniel Ruiz Saavedra Date: Thu, 17 Dec 2020 19:22:46 +0000 (+0000) Subject: SDL2_image: Add save functions X-Git-Tag: 0.51.1~125 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53fc8cf0a831ed7ddc8fcfe3b84cd3af76d87b97;p=thirdparty%2Fvala.git SDL2_image: Add save functions Add save functions for JPG and PNG formats. --- diff --git a/vapi/SDL2_image.vapi b/vapi/SDL2_image.vapi index 7bb65dc58..ff1495a59 100644 --- a/vapi/SDL2_image.vapi +++ b/vapi/SDL2_image.vapi @@ -123,6 +123,18 @@ namespace SDLImage { [CCode (cname = "IMG_ReadXPMFromArray")] public static SDL.Video.Surface? read_xpm (string[] xpmdata); + [CCode (cname = "IMG_SavePNG")] + public static int save_as_png (SDL.Video.Surface surface, string file); + + [CCode (cname = "IMG_SavePNG_RW")] + public static int save_as_png_rw (SDL.Video.Surface surface, SDL.RWops dst, bool freedst); + + [CCode (cname = "IMG_SaveJPG")] + public static int save_as_jpg (SDL.Video.Surface surface, string file, int quality); + + [CCode (cname = "IMG_SaveJPG_RW")] + public static int save_as_jpg_rw (SDL.Video.Surface surface, SDL.RWops dst, bool freedst, int quality); + //!Info [CCode (cname = "IMG_isCUR")]