MCPcopy Create free account
hub / github.com/HiLab-git/SimpleCRF / lodepng_encode_memory

Function lodepng_encode_memory

dependency/densecrf/examples/lodepng.cpp:5827–5841  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5825}
5826
5827unsigned lodepng_encode_memory(unsigned char** out, size_t* outsize, const unsigned char* image,
5828 unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth)
5829{
5830 unsigned error;
5831 LodePNGState state;
5832 lodepng_state_init(&state);
5833 state.info_raw.colortype = colortype;
5834 state.info_raw.bitdepth = bitdepth;
5835 state.info_png.color.colortype = colortype;
5836 state.info_png.color.bitdepth = bitdepth;
5837 lodepng_encode(out, outsize, image, w, h, &state);
5838 error = state.error;
5839 lodepng_state_cleanup(&state);
5840 return error;
5841}
5842
5843unsigned lodepng_encode32(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h)
5844{

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