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

Function writeSignature

depends/lodepng/lodepng.cpp:5090–5097  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5088
5089
5090static unsigned writeSignature(ucvector* out) {
5091 size_t pos = out->size;
5092 const unsigned char signature[] = {137, 80, 78, 71, 13, 10, 26, 10};
5093 /*8 bytes PNG signature, aka the magic bytes*/
5094 if(!ucvector_resize(out, out->size + 8)) return 83; /*alloc fail*/
5095 lodepng_memcpy(out->data + pos, signature, 8);
5096 return 0;
5097}
5098
5099static unsigned addChunk_IHDR(ucvector* out, unsigned w, unsigned h,
5100 LodePNGColorType colortype, unsigned bitdepth, unsigned interlace_method) {

Callers 1

lodepng_encodeFunction · 0.85

Calls 2

ucvector_resizeFunction · 0.85
lodepng_memcpyFunction · 0.85

Tested by

no test coverage detected