original_string: protected function getOffsetFromEntropy(\Imagick $originalImage, $targetWidth, $targetHeight)
      {
          // The entropy works better on a blured image
          $image = clone $originalImage;
          $image->blurImage(3, 2);
  
          $size = $image->getImageGeometry();
  
          $originalWidth = $size['width'];
          $originalHeight = $size['height'];
  
          $leftX = $this->slice($image, $originalWidth, $targetWidth, 'h');
          $topY = $this->slice($image, $originalHeight, $targetHeight, 'v');
  
          return array('x' => $leftX, 'y' => $topY);
      }
code: protected function getOffsetFromEntropy(\Imagick $originalImage, $targetWidth, $targetHeight)
      {
          // The entropy works better on a blured image
          $image = clone $originalImage;
          $image->blurImage(3, 2);
  
          $size = $image->getImageGeometry();
  
          $originalWidth = $size['width'];
          $originalHeight = $size['height'];
  
          $leftX = $this->slice($image, $originalWidth, $targetWidth, 'h');
          $topY = $this->slice($image, $originalHeight, $targetHeight, 'v');
  
          return array('x' => $leftX, 'y' => $topY);
      }
code_tokens: protected function getOffsetFromEntropy ( \ Imagick $ originalImage , $ targetWidth , $ targetHeight ) { // The entropy works better on a blured image $ image = clone $ originalImage ; $ image -> blurImage ( 3 , 2 ) ; $ size = $ image -> getImageGeometry ( ) ; $ originalWidth = $ size [ 'width' ] ; $ originalHeight = $ size [ 'height' ] ; $ leftX = $ this -> slice ( $ image , $ originalWidth , $ targetWidth , 'h' ) ; $ topY = $ this -> slice ( $ image , $ originalHeight , $ targetHeight , 'v' ) ; return array ( 'x' => $ leftX , 'y' => $ topY ) ; }
docstring: Get the offset of where the crop should start
  
  @param  \Imagick $image
  @param  int      $targetHeight
  @param  int      $targetHeight
  @param  int      $sliceSize
  @return array
docstring_tokens: Get the offset of where the crop should start