1makecol15_dither(3)             Allegro manual             makecol15_dither(3)
2
3
4

NAME

6       makecol15_dither, makecol16_dither - Calculates a dithered 15 or 16-bit
7       RGB value. Allegro game programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       int makecol15_dither(int r, int g, int b, int x, int y);
14
15       int makecol16_dither(int r, int g, int b, int x, int y);
16

DESCRIPTION

18       Given both a color value and a pixel coordinate, calculate  a  dithered
19       15  or  16-bit RGB value. This can produce better results when reducing
20       images from truecolor to hicolor. In addition to  calling  these  func‐
21       tions  directly,  hicolor  dithering  can be automatically enabled when
22       loading graphics by calling the  set_color_conversion()  function,  for
23       example   set_color_conversion(COLORCONV_REDUCE_TRUE_TO_HI   |   COLOR‐
24       CONV_DITHER).
25
26       Example:
27
28          int pixel1, pixel2;
29
30          /* The following two color values MAY be different. */
31          pixel1 = makecol16_dither(255, 192, 64, 0, 0);
32          pixel2 = makecol16_dither(255, 192, 64, 1, 0);
33

RETURN VALUE

35       Returns the RGB value dithered for the specified coordinate.
36
37

SEE ALSO

39       makecol(3), makecol8(3), set_color_conversion(3)
40
41
42
43Allegro                          version 4.2.3             makecol15_dither(3)
Impressum