| Extracted from Pike v7.8 release 866 at 2018-02-09.

[Top]
Image
Image.Colortable

# Method Image.Colortable()->ordered()

Method ordered

  `object ordered()`
  `object ordered(int r, int g, int b)`
  `object ordered(int r, int g, int b, int xsize, int ysize)`
  `object ordered(int r, int g, int b, int xsize, int ysize, int x, int y)`
  `object ordered(int r, int g, int b, int xsize, int ysize, int rx, int ry, int gx, int gy, int bx, int by)`

Description

  Set ordered dithering, which gives a position-dependent error added to the pixel values.

  original | mapped to `Image.Colortable(6,6,6)->`
  | `ordered (42,42,42,2,2)` | `ordered()` | `ordered (42,42,42, 8,8, 0,0, 0,1, 1,0)`

Parameter `r`
Parameter `g`
Parameter `b`

  The maximum error. Default is 32, or colorcube steps (256/size).

Parameter `xsize`
Parameter `ysize`

  Size of error matrix. Default is 8×8. Only values which factors to multiples of 2 and 3 are possible to choose (2,3,4,6,8,12,...).

Parameter `x`
Parameter `y`
Parameter `rx`
Parameter `ry`
Parameter `gx`
Parameter `gy`
Parameter `bx`
Parameter `by`

  Offset for the error matrix. `x` and `y` is for both red, green and blue values, the other is individual.

Returns

  the object being called

See also

  randomcube , nodither , floyd_steinberg , create