write given buffer to the file, overwriting the file, it doesn't append to it.*/
| 375 | |
| 376 | /*write given buffer to the file, overwriting the file, it doesn't append to it.*/ |
| 377 | unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename) |
| 378 | { |
| 379 | FILE* file; |
| 380 | file = fopen(filename, "wb" ); |
| 381 | if(!file) return 79; |
| 382 | fwrite((char*)buffer , 1 , buffersize, file); |
| 383 | fclose(file); |
| 384 | return 0; |
| 385 | } |
| 386 | |
| 387 | #endif /*LODEPNG_COMPILE_DISK*/ |
| 388 |
no outgoing calls
no test coverage detected