Decodes 24-bit bitmap data--basically just swaps the order of color * components. */
| 685 | * components. |
| 686 | */ |
| 687 | static void Decode24(uint8_t * p_out, |
| 688 | const uint8_t * p_out_end, |
| 689 | const uint8_t * p_file, |
| 690 | const read_context * p_ctx) |
| 691 | { |
| 692 | while(p_out < p_out_end) |
| 693 | { |
| 694 | *p_out++ = *(p_file + 2); |
| 695 | *p_out++ = *(p_file + 1); |
| 696 | *p_out++ = *(p_file ); |
| 697 | if(p_ctx->out_channels == 4) |
| 698 | *p_out++ = BMPREAD_DEFAULT_ALPHA; |
| 699 | |
| 700 | p_file += 3; |
| 701 | } |
| 702 | } |
| 703 | |
| 704 | /* Reads two bytes out of a memory buffer and converts it to a uint16_t. |
| 705 | */ |
nothing calls this directly
no outgoing calls
no test coverage detected