imgSavePngRw function
Save an SDL_Surface into PNG image data, via an SDL_RWops.
If you just want to save to a filename, you can use IMG_SavePNG() instead.
\param surface the SDL surface to save \param dst the SDL_RWops to save the image data to. \returns 0 if successful, -1 on error.
\since This function is available since SDL_image 2.0.0.
\sa IMG_SavePNG \sa IMG_SaveJPG \sa IMG_SaveJPG_RW
extern DECLSPEC int SDLCALL IMG_SavePNG_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst)
Implementation
int imgSavePngRw(
Pointer<SdlSurface> surface, Pointer<SdlRWops> dst, int freedst) {
final imgSavePngRwLookupFunction = libSdl2Image.lookupFunction<
Int32 Function(
Pointer<SdlSurface> surface, Pointer<SdlRWops> dst, Int32 freedst),
int Function(Pointer<SdlSurface> surface, Pointer<SdlRWops> dst,
int freedst)>('IMG_SavePNG_RW');
return imgSavePngRwLookupFunction(surface, dst, freedst);
}