| 4900 | } |
| 4901 | |
| 4902 | static unsigned addChunk_IHDR(ucvector* out, unsigned w, unsigned h, |
| 4903 | LodePNGColorType colortype, unsigned bitdepth, unsigned interlace_method) |
| 4904 | { |
| 4905 | unsigned error = 0; |
| 4906 | ucvector header; |
| 4907 | ucvector_init(&header); |
| 4908 | |
| 4909 | lodepng_add32bitInt(&header, w); /*width*/ |
| 4910 | lodepng_add32bitInt(&header, h); /*height*/ |
| 4911 | ucvector_push_back(&header, (unsigned char)bitdepth); /*bit depth*/ |
| 4912 | ucvector_push_back(&header, (unsigned char)colortype); /*color type*/ |
| 4913 | ucvector_push_back(&header, 0); /*compression method*/ |
| 4914 | ucvector_push_back(&header, 0); /*filter method*/ |
| 4915 | ucvector_push_back(&header, interlace_method); /*interlace method*/ |
| 4916 | |
| 4917 | error = addChunk(out, "IHDR", header.data, header.size); |
| 4918 | ucvector_cleanup(&header); |
| 4919 | |
| 4920 | return error; |
| 4921 | } |
| 4922 | |
| 4923 | static unsigned addChunk_PLTE(ucvector* out, const LodePNGColorMode* info) |
| 4924 | { |
no test coverage detected