MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / lodepng_encode_memory

Function lodepng_encode_memory

src/lodepng.cpp:5855–5869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5853}
5854
5855unsigned lodepng_encode_memory(unsigned char** out, size_t* outsize, const unsigned char* image,
5856 unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth)
5857{
5858 unsigned error;
5859 LodePNGState state;
5860 lodepng_state_init(&state);
5861 state.info_raw.colortype = colortype;
5862 state.info_raw.bitdepth = bitdepth;
5863 state.info_png.color.colortype = colortype;
5864 state.info_png.color.bitdepth = bitdepth;
5865 lodepng_encode(out, outsize, image, w, h, &state);
5866 error = state.error;
5867 lodepng_state_cleanup(&state);
5868 return error;
5869}
5870
5871unsigned lodepng_encode32(unsigned char** out, size_t* outsize, const unsigned char* image, unsigned w, unsigned h)
5872{

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