[Overview][Constants][Types][Classes][Index] Reference for unit 'ptc' (#ptc)

TPTCCopy.Palette

Set the source and destination palettes for indexed color conversion.

Declaration

Source position: copyd.inc line 44

public procedure TPTCCopy.Palette(

  ASource: IPTCPalette;

  ADestination: IPTCPalette

);

Arguments

ASource

  

The source palette.

ADestination

  

The destination palette.

Description

Set the source and destination palettes for indexed color conversion.

If neither pixel arrays are indexed color then pass blank palettes:

var
  blank_palette: IPTCPalette;
  ...
  { set blank copy palettes }
  blank_palette := TPTCPaletteFactory.CreateNew;
  copy.Palette(blank_palette, blank_palette);

Errors

TPTCError - a TPTCError exception is raised on failure.