Grafika\EditorInterface::compare PHP Method

compare() public method

Compare two images and returns a hamming distance. A value of 0 indicates a likely similar picture. A value between 1 and 10 is potentially a variation. A value greater than 10 is likely a different image.
public compare ( string | grafika\ImageInterface $image1, string | grafika\ImageInterface $image2 ) : integer
$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 integer Hamming distance. Note: This breaks the chain if you are doing fluent api calls as it does not return an Editor.
    public function compare($image1, $image2);