MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / lodepng_save_file

Function lodepng_save_file

src/lodepng.cpp:377–385  ·  view source on GitHub ↗

write given buffer to the file, overwriting the file, it doesn't append to it.*/

Source from the content-addressed store, hash-verified

375
376/*write given buffer to the file, overwriting the file, it doesn't append to it.*/
377unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename)
378{
379 FILE* file;
380 file = fopen(filename, "wb" );
381 if(!file) return 79;
382 fwrite((char*)buffer , 1 , buffersize, file);
383 fclose(file);
384 return 0;
385}
386
387#endif /*LODEPNG_COMPILE_DISK*/
388

Callers 1

lodepng_encode_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected