Skip to content

VirtualPixelMethod enum

Enum of supported virtual pixel methods.

ts
enum VirtualPixelMethod {
  BACKGROUND = 1,
  EDGE = 3,
  MIRROR = 4,
  RANDOM = 5,
  TILE = 6,
  TRANSPARENT = 7,
  BLACK = 9,
  GRAY = 10,
  WHITE = 11,
  HORIZONTAL_TILE = 12,
  VERTICAL_TILE = 13,
  HORIZONTAL_TILE_EDGE = 14,
  VERTICAL_TILE_EDGE = 15,
}

Virtual pixels are pixels that are out of actual image bounds. There are different methods that can be used to get color of such pixels.

TIP

See virtual pixel methods behavior examples at ImageMagick docs.

Method descriptions

BACKGROUND

Uses image background color.


EDGE

Uses color of closest image edge pixel.


MIRROR

Behaves like if image is infinite pattern, and each next tile of that pattern is mirrored version of sibling tile.


RANDOM

Uses random color from image color palette.


TILE

Behaves like if image is infinite pattern.


TRANSPARENT

Uses transparent color.


BLACK

Uses black color.


GRAY

Uses gray color.


WHITE

Uses white color.


HORIZONTAL_TILE

Behaves like image is infinitely tiled pattern across horizontal axis and uses background color for vertical axis.


VERTICAL_TILE

Behaves like image is infinitely tiled pattern across vertical axis and uses background color for horizontal axis.


HORIZONTAL_TILE_EDGE

Behaves like image is infinitely tiled pattern across horizontal axis and uses closest edge pixel color across vertical axis.


VERTICAL_TILE_EDGE

Behaves like image is infinitely tiled pattern across vertical axis and uses closest edge pixel color across horizontal axis.