Added support for loading and saving PNG images using stb_image

This commit is contained in:
Sam Lantinga
2025-10-06 10:18:28 -07:00
parent 8d81ee3f5d
commit 73334b6bb4
8 changed files with 368 additions and 27 deletions

View File

@@ -1260,6 +1260,10 @@ SDL3_0.0.0 {
SDL_SetTexturePalette;
SDL_GetTexturePalette;
SDL_GetGPURendererDevice;
SDL_LoadPNG_IO;
SDL_LoadPNG;
SDL_SavePNG_IO;
SDL_SavePNG;
# extra symbols go here (don't modify this line)
local: *;
};

View File

@@ -1286,3 +1286,7 @@
#define SDL_SetTexturePalette SDL_SetTexturePalette_REAL
#define SDL_GetTexturePalette SDL_GetTexturePalette_REAL
#define SDL_GetGPURendererDevice SDL_GetGPURendererDevice_REAL
#define SDL_LoadPNG_IO SDL_LoadPNG_IO_REAL
#define SDL_LoadPNG SDL_LoadPNG_REAL
#define SDL_SavePNG_IO SDL_SavePNG_IO_REAL
#define SDL_SavePNG SDL_SavePNG_REAL

View File

@@ -1294,3 +1294,7 @@ SDL_DYNAPI_PROC(Sint32,JNI_OnLoad,(JavaVM *a, void *b),(a,b),return)
SDL_DYNAPI_PROC(bool,SDL_SetTexturePalette,(SDL_Texture *a,SDL_Palette *b),(a,b),return)
SDL_DYNAPI_PROC(SDL_Palette*,SDL_GetTexturePalette,(SDL_Texture *a),(a),return)
SDL_DYNAPI_PROC(SDL_GPUDevice*,SDL_GetGPURendererDevice,(SDL_Renderer *a),(a),return)
SDL_DYNAPI_PROC(SDL_Surface*,SDL_LoadPNG_IO,(SDL_IOStream *a,bool b),(a,b),return)
SDL_DYNAPI_PROC(SDL_Surface*,SDL_LoadPNG,(const char *a),(a),return)
SDL_DYNAPI_PROC(bool,SDL_SavePNG_IO,(SDL_Surface *a,SDL_IOStream *b,bool c),(a,b,c),return)
SDL_DYNAPI_PROC(bool,SDL_SavePNG,(SDL_Surface *a,const char *b),(a,b),return)