@@ 557-570 (lines=14) @@ | ||
554 | if ($this->currentDimensions['width'] > $this->maxWidth) |
|
555 | { |
|
556 | // Image is landscape |
|
557 | switch ($quadrant) { |
|
558 | case 'L': |
|
559 | $cropX = 0; |
|
560 | break; |
|
561 | ||
562 | case 'R': |
|
563 | $cropX = intval(($this->currentDimensions['width'] - $this->maxWidth)); |
|
564 | break; |
|
565 | ||
566 | case 'C': |
|
567 | default: |
|
568 | $cropX = intval(($this->currentDimensions['width'] - $this->maxWidth) / 2); |
|
569 | break; |
|
570 | } |
|
571 | ||
572 | ||
573 | } elseif ($this->currentDimensions['height'] > $this->maxHeight) |
|
@@ 576-589 (lines=14) @@ | ||
573 | } elseif ($this->currentDimensions['height'] > $this->maxHeight) |
|
574 | { |
|
575 | // Image is portrait |
|
576 | switch ($quadrant) { |
|
577 | case 'T': |
|
578 | $cropY = 0; |
|
579 | break; |
|
580 | ||
581 | case 'B': |
|
582 | $cropY = intval(($this->currentDimensions['height'] - $this->maxHeight)); |
|
583 | break; |
|
584 | ||
585 | case 'C': |
|
586 | default: |
|
587 | $cropY = intval(($this->currentDimensions['height'] - $this->maxHeight) / 2); |
|
588 | break; |
|
589 | } |
|
590 | ||
591 | } |
|
592 |