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

Function readChunk_gAMA

depends/lodepng/lodepng.cpp:4629–4636  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4627}
4628
4629static unsigned readChunk_gAMA(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) {
4630 if(chunkLength != 4) return 96; /*invalid gAMA chunk size*/
4631
4632 info->gama_defined = 1;
4633 info->gama_gamma = 16777216u * data[0] + 65536u * data[1] + 256u * data[2] + data[3];
4634
4635 return 0; /* OK */
4636}
4637
4638static unsigned readChunk_cHRM(LodePNGInfo* info, const unsigned char* data, size_t chunkLength) {
4639 if(chunkLength != 32) return 97; /*invalid cHRM chunk size*/

Callers 2

lodepng_inspect_chunkFunction · 0.85
decodeGenericFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected