equal

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.

equal ( string|ImageInterface $image1, string|ImageInterface $image2 ): bool 
Parameters
image1

Can be an instance of Image or string containing the file system path to image.

image2

Can be an instance of Image or string containing the file system path to image.

Returns
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.