Skip to content

Commit

Permalink
moved consts
Browse files Browse the repository at this point in the history
  • Loading branch information
Seshachala Malisetti committed Oct 14, 2014
1 parent 6cbf928 commit 0345dfb
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/DifferenceHashing.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@

class DifferenceHashing implements DifferenceHashingInterface
{
const COMMON_HEIGHT = 8;
const COMMON_WIDTH = 9;

private $imagePath;
private $interventionImage;
private $width;
private $height;
private $commonHeight = 8;
private $commonWidth = 9;
private $pixels;
private $difference;
private $pixels = array();
private $difference = array();
private $binaryStr;
private $hexStr;

Expand All @@ -29,8 +29,6 @@ public function __construct($image)
$this->interventionImage = Image::make($image);
$this->width = $this->interventionImage->width();
$this->height = $this->interventionImage->height();
$this->pixels = array();
$this->difference = array();
}

public function compareAdjacentPixels()
Expand Down Expand Up @@ -92,7 +90,7 @@ public function openImage()

public function shrinkImageToCommonSize()
{
$this->interventionImage->resize($this->commonWidth, $this->commonHeight);
$this->interventionImage->resize(self::COMMON_WIDTH, self::COMMON_HEIGHT);
$this->width = $this->interventionImage->width();
$this->height = $this->interventionImage->height();

Expand Down

0 comments on commit 0345dfb

Please sign in to comment.