MCPcopy Create free account
hub / github.com/creatale/node-dv / lodepng_save_file

Function lodepng_save_file

deps/lodepng/lodepng.cpp:408–416  ·  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

406
407/*write given buffer to the file, overwriting the file, it doesn't append to it.*/
408unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename)
409{
410 FILE* file;
411 file = fopen(filename, "wb" );
412 if(!file) return 79;
413 fwrite((char*)buffer , 1 , buffersize, file);
414 fclose(file);
415 return 0;
416}
417
418#endif /*LODEPNG_COMPILE_DISK*/
419

Callers 2

lodepng_encode_fileFunction · 0.85
save_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected