Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

Commit

Permalink
rename function + make it private
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeniau committed Mar 27, 2020
1 parent 8949395 commit c299a10
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/stojg/crop/CropBalanced.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected function getRandomEdgeOffset(\Imagick $original, $targetWidth, $target
// Turn everything darker than this to pitch black
$measureImage->blackThresholdImage("#070707");
// Get the calculated offset for cropping
return $this->getOffsetBalanced2($measureImage, $targetWidth, $targetHeight);
return $this->getOffsetBalancedForImage($measureImage, $targetWidth, $targetHeight);
}

/**
Expand All @@ -58,7 +58,7 @@ protected function getRandomEdgeOffset(\Imagick $original, $targetWidth, $target
*/
public function getOffsetBalanced($targetWidth, $targetHeight)
{
return $this->getOffsetBalanced2($this->originalImage, $targetWidth, $targetHeight);
return $this->getOffsetBalancedForImage($this->originalImage, $targetWidth, $targetHeight);
}

/**
Expand All @@ -68,7 +68,8 @@ public function getOffsetBalanced($targetWidth, $targetHeight)
* @return array
* @throws \Exception
*/
protected function getOffsetBalanced2(\Imagick $image, $targetWidth, $targetHeight) {
private function getOffsetBalancedForImage(\Imagick $image, $targetWidth, $targetHeight)
{
$size = $image->getImageGeometry();

$points = array();
Expand Down

0 comments on commit c299a10

Please sign in to comment.