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

Function readChunk_pHYs

samples/shared/lodepng.cpp:4401–4411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4399}
4400
4401static unsigned readChunk_pHYs(LodePNGInfo* info, const unsigned char* data, size_t chunkLength)
4402{
4403 if(chunkLength != 9) return 74; /*invalid pHYs chunk size*/
4404
4405 info->phys_defined = 1;
4406 info->phys_x = 16777216u * data[0] + 65536u * data[1] + 256u * data[2] + data[3];
4407 info->phys_y = 16777216u * data[4] + 65536u * data[5] + 256u * data[6] + data[7];
4408 info->phys_unit = data[8];
4409
4410 return 0; /* OK */
4411}
4412#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
4413
4414/*read a PNG, the result will be in the same color type as the PNG (hence "generic")*/

Callers 1

decodeGenericFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected