| 5737 | |
| 5738 | |
| 5739 | static 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 | |
| 5748 | static unsigned addChunk_IHDR(ucvector* out, unsigned w, unsigned h, |
| 5749 | LodePNGColorType colortype, unsigned bitdepth, unsigned interlace_method) { |
no test coverage detected