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

Function readChunk_pHYs

src/lodepng.cpp:4548–4558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4546}
4547
4548static unsigned readChunk_pHYs(LodePNGInfo* info, const unsigned char* data, size_t chunkLength)
4549{
4550 if(chunkLength != 9) return 74; /*invalid pHYs chunk size*/
4551
4552 info->phys_defined = 1;
4553 info->phys_x = 16777216 * data[0] + 65536 * data[1] + 256 * data[2] + data[3];
4554 info->phys_y = 16777216 * data[4] + 65536 * data[5] + 256 * data[6] + data[7];
4555 info->phys_unit = data[8];
4556
4557 return 0; /* OK */
4558}
4559#endif /*LODEPNG_COMPILE_ANCILLARY_CHUNKS*/
4560
4561/*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