| 5088 | |
| 5089 | |
| 5090 | static 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 | |
| 5099 | static unsigned addChunk_IHDR(ucvector* out, unsigned w, unsigned h, |
| 5100 | LodePNGColorType colortype, unsigned bitdepth, unsigned interlace_method) { |
no test coverage detected