@@ 27-29 (lines=3) @@ | ||
24 | ||
25 | $sizes = []; |
|
26 | ||
27 | if ($this->includeSource && (!$this->maxWidth || $width <= $this->maxWidth) && (!$this->maxFileSize || $fileSize <= $this->maxFileSize)) { |
|
28 | $sizes[$width] = $height; |
|
29 | } |
|
30 | ||
31 | do { |
|
32 | $fileSize = $fileSize * $this->stepModifier; |
|
@@ 35-37 (lines=3) @@ | ||
32 | $fileSize = $fileSize * $this->stepModifier; |
|
33 | $newWidth = floor(sqrt(($fileSize / $pixelPrice) / $ratio)); |
|
34 | ||
35 | if ((!$this->maxFileSize || $fileSize <= $this->maxFileSize) && (!$this->maxWidth || $newWidth <= $this->maxWidth)) { |
|
36 | $sizes[(int) $newWidth] = (int) $newWidth * $ratio; |
|
37 | } |
|
38 | } while ($fileSize > $this->minFileSize && $newWidth > $this->minWidth); |
|
39 | ||
40 | return $sizes; |