MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / addChunk_tIME

Function addChunk_tIME

src/lodepng.cpp:5123–5138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5121}
5122
5123static 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
5140static unsigned addChunk_pHYs(ucvector* out, const LodePNGInfo* info)
5141{

Callers 1

lodepng_encodeFunction · 0.85

Calls 3

lodepng_mallocFunction · 0.85
addChunkFunction · 0.85
lodepng_freeFunction · 0.85

Tested by

no test coverage detected