MCPcopy Create free account
hub / github.com/KhronosGroup/KTX-Software / writeSignature

Function writeSignature

external/lodepng/lodepng.cpp:5739–5746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5737
5738
5739static unsigned writeSignature(ucvector* out) {
5740 size_t pos = out->size;
5741 const unsigned char signature[] = {137, 80, 78, 71, 13, 10, 26, 10};
5742 /*8 bytes PNG signature, aka the magic bytes*/
5743 if(!ucvector_resize(out, out->size + 8)) return 83; /*alloc fail*/
5744 lodepng_memcpy(out->data + pos, signature, 8);
5745 return 0;
5746}
5747
5748static unsigned addChunk_IHDR(ucvector* out, unsigned w, unsigned h,
5749 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