| Extracted from Pike v7.8 release 700 at 2013-06-08.

[Top]
Image
Image.Colortable

# Method Image.Colortable()->`*()

Method `*

  `object map(object image)`
  `object `*(object image)`
  `object ``*(object image)`
  `object map(string data, int xsize, int ysize)`
  `object `*(string data, int xsize, int ysize)`
  `object ``*(string data, int xsize, int ysize)`

Description

  Map colors in an image object to the colors in the colortable, and creates a new image with the closest colors.

  |  |  |  |  |  | no dither
  |  |  |  |  |  | floyd_steinberg dither
  |  |  |  |  |  | ordered dither
  |  |  |  |  |  | randomcube dither
  original | 2 | 4 | 8 | 16 | 32 colors

Returns

  a new image object

Note

  Flat (not cube) colortable and not 'full ' method: this method does figure out the data needed for the lookup method, which may take time the first use of the colortable - the second use is quicker.

See also

  cubicles , full