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

Function getNumColorChannels

src/lodepng.cpp:2503–2514  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2501}
2502
2503static unsigned getNumColorChannels(LodePNGColorType colortype)
2504{
2505 switch(colortype)
2506 {
2507 case 0: return 1; /*grey*/
2508 case 2: return 3; /*RGB*/
2509 case 3: return 1; /*palette*/
2510 case 4: return 2; /*grey + alpha*/
2511 case 6: return 4; /*RGBA*/
2512 }
2513 return 0; /*unexisting color type*/
2514}
2515
2516static unsigned lodepng_get_bpp_lct(LodePNGColorType colortype, unsigned bitdepth)
2517{

Callers 2

lodepng_get_bpp_lctFunction · 0.85
lodepng_get_channelsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected