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

[Top]
Image
Image.Image

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

Method `>

  `int `==(object operand)`
  `int `==(array(int) color)`
  `int `==(int value)`
  `int `<(object operand)`
  `int `<(array(int) color)`
  `int `<(int value)`
  `int `>(object operand)`
  `int `>(array(int) color)`
  `int `>(int value)`

Description

  Compares an image with another image or a color.

  Comparision is strict and on pixel-by-pixel basis. (Means if not all pixel r,g,b values are correct compared with the corresponding pixel values, 0 is returned.)

Parameter `operand`

  the other image to compare with; the images must have the same size.

Parameter `color`

  an array in format ({r,g,b}), this is equal to using an uniform-colored image.

Parameter `value`

  equal to ({value,value,value}).

Returns

  true (1) or false (0).

Note

  `< or `> on empty ("no image") image objects or images with different size will result in an error. `== is always true on two empty image objects and always false if one and only one of the image objects is empty or the images differs in size.

  a>=b and a<=b between objects is equal to !(a<b) and !(a>b), which may not be what you want (since both < and > can return false, comparing the same images).

See also

  `- , `+ , `| , `* , `&amp;