Save an SDL_Surface into PNG image data, via an SDL_RWops.
Defined in <SDL_image.h>
int IMG_SavePNG_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst);
SDL_Surface * | surface | the SDL surface to save. |
SDL_RWops * | dst | the SDL_RWops to save the image data to. |
(int) Returns 0 if successful, -1 on error.
If you just want to save to a filename, you can use IMG_SavePNG() instead.
This function is available since SDL_image 2.0.0.