/* Transforms a 24bpp pixel data into an RGB565 pixel.  */
static uint16_t colorTransform24ToRGB565(uint8_t red, uint8_t green, uint8_t blue)
/* Transforms a 24bpp pixel data into an RGB565 pixel.  */
static uint16_t colorTransform24ToRGB565(uint8_t red, uint8_t green, uint8_t blue)
{
  red   = red >> 3;
  green = green >> 2;
  blue  = blue >> 3;
  return (red << 11) | (green << 5) | blue;
}