MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / addChunk_tIME

Function addChunk_tIME

samples/shared/lodepng.cpp:4972–4987  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4970}
4971
4972static unsigned addChunk_tIME(ucvector* out, const LodePNGTime* time)
4973{
4974 unsigned error = 0;
4975 unsigned char* data = (unsigned char*)lodepng_malloc(7);
4976 if(!data) return 83; /*alloc fail*/
4977 data[0] = (unsigned char)(time->year / 256);
4978 data[1] = (unsigned char)(time->year % 256);
4979 data[2] = (unsigned char)time->month;
4980 data[3] = (unsigned char)time->day;
4981 data[4] = (unsigned char)time->hour;
4982 data[5] = (unsigned char)time->minute;
4983 data[6] = (unsigned char)time->second;
4984 error = addChunk(out, "tIME", data, 7);
4985 lodepng_free(data);
4986 return error;
4987}
4988
4989static unsigned addChunk_pHYs(ucvector* out, const LodePNGInfo* info)
4990{

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