TrimPalette

function TrimPalette(const palette: TArrayOfColor32; var colorFrequency: TArrayOfInteger; newSize: integer): TArrayOfColor32;


Reduces the palette size by removing the least frequently used colors. It assumes that CreatePaletteEx has been called previously, and the returned colorFrequency parameter from that function is the same one passed to this function. colorFrequency will also be updated to properly reflect the new palette.

See Also

CreatePaletteEx, TidyPalette