MCPcopy Create free account
hub / github.com/HiLab-git/SimpleCRF / getNumColorChannels

Function getNumColorChannels

dependency/densecrf/examples/lodepng.cpp:2562–2573  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2560}
2561
2562static unsigned getNumColorChannels(LodePNGColorType colortype)
2563{
2564 switch(colortype)
2565 {
2566 case 0: return 1; /*grey*/
2567 case 2: return 3; /*RGB*/
2568 case 3: return 1; /*palette*/
2569 case 4: return 2; /*grey + alpha*/
2570 case 6: return 4; /*RGBA*/
2571 }
2572 return 0; /*unexisting color type*/
2573}
2574
2575static unsigned lodepng_get_bpp_lct(LodePNGColorType colortype, unsigned bitdepth)
2576{

Callers 2

lodepng_get_bpp_lctFunction · 0.85
lodepng_get_channelsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected