Skip to content

Commit

Permalink
Scale: Ignore scale ratio 1.3, because that's nonsense.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek authored Sep 28, 2022
1 parent d6c5f7e commit 2172aad
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/ImageGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,8 @@ private function scale(string $absolutePath, string $scale, array $size): void
}

if (
($width / $imageSize[0] < 1.3 && $height / $imageSize[1] < 1.3)
&& (
($width === $imageSize[0] && $height >= $imageSize[1])
|| ($height === $imageSize[1] && $width >= $imageSize[0])
) === false
!($width === $imageSize[0] && $height >= $imageSize[1])
&& !($height === $imageSize[1] && $width >= $imageSize[0])
) {
$this->saveNetteImage(
$absolutePath,
Expand Down

0 comments on commit 2172aad

Please sign in to comment.