Grafika\EditorInterface::equal PHP Method

equal() public method

Compare if two images are equal. It will compare if the two images are of the same width and height. If the dimensions differ, it will return false. If the dimensions are equal, it will loop through each pixels. If one of the pixel don't match, it will return false. The pixels are compared using their RGB (Red, Green, Blue) values.
public equal ( string | grafika\ImageInterface $image1, string | grafika\ImageInterface $image2 ) : boolean
$image1 string | grafika\ImageInterface Can be an instance of Image or string containing the file system path to image.
$image2 string | grafika\ImageInterface Can be an instance of Image or string containing the file system path to image.
return boolean True if equals false if not. Note: This breaks the chain if you are doing fluent api calls as it does not return an Editor.
    public function equal($image1, $image2);