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