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.