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

Function getNumColorChannels

samples/shared/lodepng.cpp:2527–2538  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2525}
2526
2527static unsigned getNumColorChannels(LodePNGColorType colortype)
2528{
2529 switch(colortype)
2530 {
2531 case 0: return 1; /*grey*/
2532 case 2: return 3; /*RGB*/
2533 case 3: return 1; /*palette*/
2534 case 4: return 2; /*grey + alpha*/
2535 case 6: return 4; /*RGBA*/
2536 }
2537 return 0; /*unexisting color type*/
2538}
2539
2540static unsigned lodepng_get_bpp_lct(LodePNGColorType colortype, unsigned bitdepth)
2541{

Callers 2

lodepng_get_bpp_lctFunction · 0.85
lodepng_get_channelsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected