@@ 51-53 (lines=3) @@ | ||
48 | return [(int) $newWidth, (int) ceil($scaleWidth * $oldHeight)]; |
|
49 | } |
|
50 | ||
51 | if ($scaleWidth < $scaleHeight) { |
|
52 | return [(int) ceil($scaleHeight * $oldWidth), (int) $newHeight]; |
|
53 | } |
|
54 | } else { |
|
55 | if ($scaleWidth < $scaleHeight) { |
|
56 | return [(int) $newWidth, (int) ceil($scaleWidth * $oldHeight)]; |
|
@@ 59-61 (lines=3) @@ | ||
56 | return [(int) $newWidth, (int) ceil($scaleWidth * $oldHeight)]; |
|
57 | } |
|
58 | ||
59 | if ($scaleWidth > $scaleHeight) { |
|
60 | return [(int) ceil($scaleHeight * $oldWidth), (int) $newHeight]; |
|
61 | } |
|
62 | } |
|
63 | ||
64 | if ($scaleWidth < $scaleHeight || ($cover && $scaleWidth > $scaleHeight)) { |