MCPcopy Create free account
hub / github.com/HiLab-git/SimpleCRF / addChunk_tIME

Function addChunk_tIME

dependency/densecrf/examples/lodepng.cpp:5103–5118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5101}
5102
5103static unsigned addChunk_tIME(ucvector* out, const LodePNGTime* time)
5104{
5105 unsigned error = 0;
5106 unsigned char* data = (unsigned char*)lodepng_malloc(7);
5107 if(!data) return 83; /*alloc fail*/
5108 data[0] = (unsigned char)(time->year >> 8);
5109 data[1] = (unsigned char)(time->year & 255);
5110 data[2] = (unsigned char)time->month;
5111 data[3] = (unsigned char)time->day;
5112 data[4] = (unsigned char)time->hour;
5113 data[5] = (unsigned char)time->minute;
5114 data[6] = (unsigned char)time->second;
5115 error = addChunk(out, "tIME", data, 7);
5116 lodepng_free(data);
5117 return error;
5118}
5119
5120static unsigned addChunk_pHYs(ucvector* out, const LodePNGInfo* info)
5121{

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