MCPcopy Create free account
hub / github.com/creatale/node-dv / lodepng_encode_file

Function lodepng_encode_file

deps/lodepng/lodepng.cpp:5929–5938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5927
5928#ifdef LODEPNG_COMPILE_DISK
5929unsigned lodepng_encode_file(const char* filename, const unsigned char* image, unsigned w, unsigned h,
5930 LodePNGColorType colortype, unsigned bitdepth)
5931{
5932 unsigned char* buffer;
5933 size_t buffersize;
5934 unsigned error = lodepng_encode_memory(&buffer, &buffersize, image, w, h, colortype, bitdepth);
5935 if(!error) error = lodepng_save_file(buffer, buffersize, filename);
5936 lodepng_free(buffer);
5937 return error;
5938}
5939
5940unsigned lodepng_encode32_file(const char* filename, const unsigned char* image, unsigned w, unsigned h)
5941{

Callers 2

lodepng_encode32_fileFunction · 0.85
lodepng_encode24_fileFunction · 0.85

Calls 3

lodepng_encode_memoryFunction · 0.85
lodepng_save_fileFunction · 0.85
lodepng_freeFunction · 0.85

Tested by

no test coverage detected