| 5121 | } |
| 5122 | |
| 5123 | static unsigned addChunk_tIME(ucvector* out, const LodePNGTime* time) |
| 5124 | { |
| 5125 | unsigned error = 0; |
| 5126 | unsigned char* data = (unsigned char*)lodepng_malloc(7); |
| 5127 | if(!data) return 83; /*alloc fail*/ |
| 5128 | data[0] = (unsigned char)(time->year / 256); |
| 5129 | data[1] = (unsigned char)(time->year % 256); |
| 5130 | data[2] = time->month; |
| 5131 | data[3] = time->day; |
| 5132 | data[4] = time->hour; |
| 5133 | data[5] = time->minute; |
| 5134 | data[6] = time->second; |
| 5135 | error = addChunk(out, "tIME", data, 7); |
| 5136 | lodepng_free(data); |
| 5137 | return error; |
| 5138 | } |
| 5139 | |
| 5140 | static unsigned addChunk_pHYs(ucvector* out, const LodePNGInfo* info) |
| 5141 | { |
no test coverage detected