MCPcopy Create free account
hub / github.com/OpenNFS/OpenNFS / Decode8

Function Decode8

include/bmpread/bmpread.c:739–753  ·  view source on GitHub ↗

Decodes 8-bit bitmap data by looking colors up in the palette. */

Source from the content-addressed store, hash-verified

737/* Decodes 8-bit bitmap data by looking colors up in the palette.
738 */
739static 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 */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected