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