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

Function decode

src/lodepng.cpp:6136–6151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6134#ifdef LODEPNG_COMPILE_DECODER
6135
6136unsigned decode(std::vector<unsigned char>& out, unsigned& w, unsigned& h, const unsigned char* in,
6137 size_t insize, LodePNGColorType colortype, unsigned bitdepth)
6138{
6139 unsigned char* buffer;
6140 unsigned error = lodepng_decode_memory(&buffer, &w, &h, in, insize, colortype, bitdepth);
6141 if(buffer && !error)
6142 {
6143 State state;
6144 state.info_raw.colortype = colortype;
6145 state.info_raw.bitdepth = bitdepth;
6146 size_t buffersize = lodepng_get_raw_size(w, h, &state.info_raw);
6147 out.insert(out.end(), &buffer[0], &buffer[buffersize]);
6148 lodepng_free(buffer);
6149 }
6150 return error;
6151}
6152
6153unsigned decode(std::vector<unsigned char>& out, unsigned& w, unsigned& h,
6154 const std::vector<unsigned char>& in, LodePNGColorType colortype, unsigned bitdepth)

Callers

nothing calls this directly

Calls 6

lodepng_decode_memoryFunction · 0.85
lodepng_get_raw_sizeFunction · 0.85
lodepng_freeFunction · 0.85
lodepng_decodeFunction · 0.85
load_fileFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected