MCPcopy Create free account
hub / github.com/DFHack/dfhack / readChunk_tIME

Function readChunk_tIME

depends/lodepng/lodepng.cpp:4604–4616  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4602}
4603
4604static unsigned readChunk_tIME(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) {
4605 if(chunkLength != 7) return 73; /*invalid tIME chunk size*/
4606
4607 info->time_defined = 1;
4608 info->time.year = 256u * data[0] + data[1];
4609 info->time.month = data[2];
4610 info->time.day = data[3];
4611 info->time.hour = data[4];
4612 info->time.minute = data[5];
4613 info->time.second = data[6];
4614
4615 return 0; /* OK */
4616}
4617
4618static unsigned readChunk_pHYs(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) {
4619 if(chunkLength != 9) return 74; /*invalid pHYs chunk size*/

Callers 2

lodepng_inspect_chunkFunction · 0.85
decodeGenericFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected