write given buffer to the file, overwriting the file, it doesn't append to it.*/
| 392 | |
| 393 | /*write given buffer to the file, overwriting the file, it doesn't append to it.*/ |
| 394 | unsigned 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 |
no outgoing calls
no test coverage detected