MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / lodepng_save_file

Function lodepng_save_file

samples/shared/lodepng.cpp:394–402  ·  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

392
393/*write given buffer to the file, overwriting the file, it doesn't append to it.*/
394unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename)
395{
396 FILE* file;
397 file = fopen(filename, "wb" );
398 if(!file) return 79;
399 fwrite((char*)buffer , 1 , buffersize, file);
400 fclose(file);
401 return 0;
402}
403
404#endif /*LODEPNG_COMPILE_DISK*/
405

Callers 1

lodepng_encode_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected