Reduces the number of colors of the Image.
function ReduceColors(var Image: TImageData; MaxColors: LongInt): Boolean;
Imaging (at line 178)
Currently MaxColors must be in range <2, 4096>. Color reduction works also for alpha channel. Note that for large images and big number of colors it can be very slow. Output format of the image is the same as input format.