@@ 64-66 (lines=3) @@ | ||
61 | } |
|
62 | } |
|
63 | ||
64 | if ($scaleWidth < $scaleHeight || ($cover && $scaleWidth > $scaleHeight)) { |
|
65 | return [(int) $newWidth, (int) ceil($scaleWidth * $oldHeight)]; |
|
66 | } |
|
67 | ||
68 | if ($scaleWidth > $scaleHeight || ($cover && $scaleWidth < $scaleHeight)) { |
|
69 | return [(int) ceil($scaleHeight * $oldWidth), (int) $newHeight]; |
|
@@ 68-70 (lines=3) @@ | ||
65 | return [(int) $newWidth, (int) ceil($scaleWidth * $oldHeight)]; |
|
66 | } |
|
67 | ||
68 | if ($scaleWidth > $scaleHeight || ($cover && $scaleWidth < $scaleHeight)) { |
|
69 | return [(int) ceil($scaleHeight * $oldWidth), (int) $newHeight]; |
|
70 | } |
|
71 | ||
72 | return [(int) $newWidth, (int) $newHeight]; |
|
73 | } |