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