MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / write_data_to_file

Function write_data_to_file

external/basisu/encoder/basisu_enc.cpp:571–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569 }
570
571 bool write_data_to_file(const char* pFilename, const void* pData, size_t len)
572 {
573 FILE* pFile = nullptr;
574#ifdef _WIN32
575 fopen_s(&pFile, pFilename, "wb");
576#else
577 pFile = fopen(pFilename, "wb");
578#endif
579 if (!pFile)
580 return false;
581
582 if (len)
583 {
584 if (fwrite(pData, 1, len, pFile) != len)
585 {
586 fclose(pFile);
587 return false;
588 }
589 }
590
591 return fclose(pFile) != EOF;
592 }
593
594 float linear_to_srgb(float l)
595 {

Callers 2

write_vec_to_fileFunction · 0.85
save_pngFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected