src/ImageMagick.php
public function createDiffGifOnDifferences($expectedImage,
	                                           $compareImage,
	                                           $resultImageName,
	                                           $resultImageDirectory = '.')
	{
		if(!$this->compare->same($expectedImage, $compareImage))
		{
			$this->convert->createGifCommand([$expectedImage, $compareImage], $resultImageName, $resultImageDirectory);

			return true;
		}

		return false;
	}
public function createDiffGifOnDifferences($expectedImage,
	                                           $compareImage,
	                                           $resultImageName,
	                                           $resultImageDirectory = '.')
	{
		if(!$this->compare->same($expectedImage, $compareImage))
		{
			$this->convert->createGifCommand([$expectedImage, $compareImage], $resultImageName, $resultImageDirectory);

			return true;
		}

		return false;
	}
Compares two images. If they not looking equal, a gif image of both,
the expected and result image will be created.

@param string $expectedImage        Path to expected image.
@param string $compareImage         Path to compare image.
@param string $resultImageName      Name of result gif, if the images not looking equal.
@param string $resultImageDirectory (Optional) Path to result image directory. If not set, the cwd is used.

@return bool True when a difference gif images was created, false otherwise.