| @@ 55-60 (lines=6) @@ | ||
| 52 | return array('width' => $img->getWidth(), 'height' => $img->getHeight()); |
|
| 53 | } |
|
| 54 | ||
| 55 | if ($width !== null) { |
|
| 56 | $width = Coordinate::fix($width, $img->getWidth()); |
|
| 57 | $rx = $img->getWidth() / $width; |
|
| 58 | } else { |
|
| 59 | $rx = null; |
|
| 60 | } |
|
| 61 | ||
| 62 | if ($height !== null) { |
|
| 63 | $height = Coordinate::fix($height, $img->getHeight()); |
|
| @@ 69-72 (lines=4) @@ | ||
| 66 | $ry = null; |
|
| 67 | } |
|
| 68 | ||
| 69 | if ($rx === null && $ry !== null) { |
|
| 70 | $rx = $ry; |
|
| 71 | $width = round($img->getWidth() / $rx); |
|
| 72 | } |
|
| 73 | ||
| 74 | if ($ry === null && $rx !== null) { |
|
| 75 | $ry = $rx; |
|