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

Function Decode24

include/bmpread/bmpread.c:687–702  ·  view source on GitHub ↗

Decodes 24-bit bitmap data--basically just swaps the order of color * components. */

Source from the content-addressed store, hash-verified

685 * components.
686 */
687static 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 */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected