MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / lodepng_encode_memory

Function lodepng_encode_memory

samples/shared/lodepng.cpp:5704–5718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5702}
5703
5704unsigned lodepng_encode_memory(unsigned char** out, size_t* outsize, const unsigned char* image,
5705 unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth)
5706{
5707 unsigned error;
5708 LodePNGState state;
5709 lodepng_state_init(&state);
5710 state.info_raw.colortype = colortype;
5711 state.info_raw.bitdepth = bitdepth;
5712 state.info_png.color.colortype = colortype;
5713 state.info_png.color.bitdepth = bitdepth;
5714 lodepng_encode(out, outsize, image, w, h, &state);
5715 error = state.error;
5716 lodepng_state_cleanup(&state);
5717 return error;
5718}
5719
5720unsigned lodepng_encode32(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h)
5721{

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