| 4901 | } |
| 4902 | |
| 4903 | static unsigned addChunk_PLTE(ucvector* out, const LodePNGColorMode* info) |
| 4904 | { |
| 4905 | unsigned error = 0; |
| 4906 | size_t i; |
| 4907 | ucvector PLTE; |
| 4908 | ucvector_init(&PLTE); |
| 4909 | for(i = 0; i != info->palettesize * 4; ++i) |
| 4910 | { |
| 4911 | /*add all channels except alpha channel*/ |
| 4912 | if(i % 4 != 3) ucvector_push_back(&PLTE, info->palette[i]); |
| 4913 | } |
| 4914 | error = addChunk(out, "PLTE", PLTE.data, PLTE.size); |
| 4915 | ucvector_cleanup(&PLTE); |
| 4916 | |
| 4917 | return error; |
| 4918 | } |
| 4919 | |
| 4920 | static unsigned addChunk_tRNS(ucvector* out, const LodePNGColorMode* info) |
| 4921 | { |
no test coverage detected