Imagine/Filter/Loader/DownscaleFilterLoader.php 1 location
|
@@ 34-38 (lines=5) @@
|
| 31 |
|
$heightRatio = $height / $origHeight; |
| 32 |
|
|
| 33 |
|
// faster check than is_null |
| 34 |
|
if (null === $width || null === $height) { |
| 35 |
|
$ratio = max($widthRatio, $heightRatio); |
| 36 |
|
} else { |
| 37 |
|
$ratio = min($widthRatio, $heightRatio); |
| 38 |
|
} |
| 39 |
|
|
| 40 |
|
if ($ratio > 1) { |
| 41 |
|
return $image; |
Imagine/Filter/Loader/UpscaleFilterLoader.php 1 location
|
@@ 36-40 (lines=5) @@
|
| 33 |
|
$heightRatio = $height / $origHeight; |
| 34 |
|
|
| 35 |
|
// faster check than is_null |
| 36 |
|
if (null === $width || null === $height) { |
| 37 |
|
$ratio = max($widthRatio, $heightRatio); |
| 38 |
|
} else { |
| 39 |
|
$ratio = min($widthRatio, $heightRatio); |
| 40 |
|
} |
| 41 |
|
|
| 42 |
|
if ($ratio < 1) { |
| 43 |
|
return $image; |