Skip to content

Commit da7d132

Browse files
author
Neubert, Sebastian
committed
PHP5.3 improvements #4, #30
1 parent e2d930d commit da7d132

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

module/VisualCeption.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -368,18 +368,17 @@ private function compareImages ($image1, $image2)
368368
$imagick1Size = $imagick1->getImageGeometry();
369369
$imagick2Size = $imagick2->getImageGeometry();
370370

371-
$maxWidth = max($imagick1Size['width'], $imagick2->getImageGeometry()['width']);
372-
$maxHeight = max($imagick2Size['height'], $imagick2->getImageGeometry()['height']);
371+
$maxWidth = max($imagick1Size['width'], $imagick2Size['width']);
372+
$maxHeight = max($imagick1Size['height'], $imagick2Size['height']);
373373

374374
$imagick1->extentImage($maxWidth, $maxHeight, 0, 0);
375375
$imagick2->extentImage($maxWidth, $maxHeight, 0, 0);
376376

377-
378377
try {
379378
$result = $imagick1->compareImages($imagick2, \Imagick::METRIC_MEANSQUAREERROR);
380379
$result[0]->setImageFormat("png");
381380
} catch (\ImagickException $e) {
382-
$this->debug("ImageMagickException! could not campare image1 ($image1) and image2 ($image2).\nExceptionMessage: " . $e->getMessage());
381+
$this->debug("IMagickException! could not campare image1 ($image1) and image2 ($image2).\nExceptionMessage: " . $e->getMessage());
383382
$this->fail($e->getMessage() . ", image1 $image1 and image2 $image2.");
384383
}
385384
\PHPUnit_Framework_Assert::assertTrue(true);

0 commit comments

Comments
 (0)