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

Function lodepng_encode_memory

deps/lodepng/lodepng.cpp:5902–5916  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5900}
5901
5902unsigned lodepng_encode_memory(unsigned char** out, size_t* outsize, const unsigned char* image,
5903 unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth)
5904{
5905 unsigned error;
5906 LodePNGState state;
5907 lodepng_state_init(&state);
5908 state.info_raw.colortype = colortype;
5909 state.info_raw.bitdepth = bitdepth;
5910 state.info_png.color.colortype = colortype;
5911 state.info_png.color.bitdepth = bitdepth;
5912 lodepng_encode(out, outsize, image, w, h, &state);
5913 error = state.error;
5914 lodepng_state_cleanup(&state);
5915 return error;
5916}
5917
5918unsigned lodepng_encode32(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h)
5919{

Callers 4

lodepng_encode32Function · 0.85
lodepng_encode24Function · 0.85
lodepng_encode_fileFunction · 0.85
encodeFunction · 0.85

Calls 3

lodepng_state_initFunction · 0.85
lodepng_encodeFunction · 0.85
lodepng_state_cleanupFunction · 0.85

Tested by

no test coverage detected