| 2501 | } |
| 2502 | |
| 2503 | static 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 | |
| 2516 | static unsigned lodepng_get_bpp_lct(LodePNGColorType colortype, unsigned bitdepth) |
| 2517 | { |
no outgoing calls
no test coverage detected