Ignore:
Timestamp:
Apr 17, 2006, 2:46:34 PM (15 years ago)
Author:
Sam Hocevar
Message:
  • Implemented argb32 to rgb24fg/bg colour conversions.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cucul/colour.c

    r778 r789  
    176176}
    177177
     178#define RGB12TO24(i) \
     179   ((uint32_t)((i & 0xf00) >> 8) * 0x11 \
     180  | (uint32_t)((i & 0x0f0) >> 4) * 0x11 \
     181  | (uint32_t)(i & 0x00f) * 0x11)
     182
     183uint32_t _cucul_argb32_to_rgb24fg(uint32_t c)
     184{
     185    return RGB12TO24(_cucul_argb32_to_rgb12fg(c));
     186}
     187
     188uint32_t _cucul_argb32_to_rgb24bg(uint32_t c)
     189{
     190    return RGB12TO24(_cucul_argb32_to_rgb12bg(c));
     191}
     192
    178193void _cucul_argb32_to_argb4(uint32_t c, uint8_t argb[8])
    179194{
Note: See TracChangeset for help on using the changeset viewer.