MCPcopy Create free account
hub / github.com/HiLab-git/SimpleCRF / lodepng_save_file

Function lodepng_save_file

dependency/densecrf/examples/lodepng.cpp:400–408  ·  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

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

Callers 2

lodepng_encode_fileFunction · 0.85
save_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected