Decodes 8-bit bitmap data by looking colors up in the palette. */
| 737 | /* Decodes 8-bit bitmap data by looking colors up in the palette. |
| 738 | */ |
| 739 | static void Decode8(uint8_t * p_out, |
| 740 | const uint8_t * p_out_end, |
| 741 | const uint8_t * p_file, |
| 742 | const read_context * p_ctx) |
| 743 | { |
| 744 | while(p_out < p_out_end) { |
| 745 | *p_out++ = p_ctx->palette[*p_file].red; |
| 746 | *p_out++ = p_ctx->palette[*p_file].green; |
| 747 | *p_out++ = p_ctx->palette[*p_file].blue; |
| 748 | if(p_ctx->out_channels == 4) |
| 749 | *p_out++ = BMPREAD_DEFAULT_ALPHA; |
| 750 | |
| 751 | p_file++; |
| 752 | } |
| 753 | } |
| 754 | |
| 755 | /* Decodes 4-bit bitmap data by looking colors up in the palette. |
| 756 | */ |
nothing calls this directly
no outgoing calls
no test coverage detected