getHeight() public method

Get the current height
public getHeight ( ) : integer
return integer
Beispiel #1
0
 public function testIssue8()
 {
     $excepted = Helper::getExpected(__FUNCTION__ . '.png');
     $actual = Helper::getActual(__FUNCTION__ . '.png');
     $base = Helper::getOrig('issue-8/original.png');
     $img = new Image($base);
     if ($img->getHeight() != $img->getWidth()) {
         if ($img->getWidth() < 175) {
             $img->fitToWidth($img->getWidth());
         } else {
             $img->fitToWidth(175);
         }
     } else {
         $img->bestFit(175, 175);
     }
     $img->saveAs($actual);
     Helper::isFileEq($actual, $excepted);
 }
Beispiel #2
0
 public function testGetWidthAndHeight()
 {
     $original = Helper::getOrig('butterfly.png');
     $img = new Image($original);
     is(640, $img->getWidth());
     is(478, $img->getHeight());
 }