MCPcopy Create free account
hub / github.com/DFHack/dfhack / lodepng_chunk_createv

Function lodepng_chunk_createv

depends/lodepng/lodepng.cpp:2606–2618  ·  view source on GitHub ↗

like lodepng_chunk_create but with custom allocsize */

Source from the content-addressed store, hash-verified

2604
2605/* like lodepng_chunk_create but with custom allocsize */
2606static unsigned lodepng_chunk_createv(ucvector* out,
2607 unsigned length, const char* type, const unsigned char* data) {
2608 unsigned char* chunk;
2609 CERROR_TRY_RETURN(lodepng_chunk_init(&chunk, out, length, type));
2610
2611 /*3: the data*/
2612 lodepng_memcpy(chunk + 8, data, length);
2613
2614 /*4: CRC (of the chunkname characters and the data)*/
2615 lodepng_chunk_generate_crc(chunk);
2616
2617 return 0;
2618}
2619
2620unsigned lodepng_chunk_create(unsigned char** out, size_t* outsize,
2621 unsigned length, const char* type, const unsigned char* data) {

Callers 4

lodepng_chunk_createFunction · 0.85
addChunk_IDATFunction · 0.85
addChunk_IENDFunction · 0.85
addChunk_sRGBFunction · 0.85

Calls 3

lodepng_chunk_initFunction · 0.85
lodepng_memcpyFunction · 0.85

Tested by

no test coverage detected