| @@ 44-50 (lines=7) @@ | ||
| 41 | * @return ImageInterface |
|
| 42 | * @throws Exception |
|
| 43 | */ |
|
| 44 | public function resizeByBlurBackground(int $width, int $height): ImageInterface |
|
| 45 | { |
|
| 46 | $background = new Image(base64_encode((string) $this), Image::GD); |
|
| 47 | $background->blur()->resize($width, $height); |
|
| 48 | ||
| 49 | return $this->setBackground($width, $height, $background); |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @param int $level |
|
| @@ 256-262 (lines=7) @@ | ||
| 253 | return $this->setBackground($width, $height, new Image(base64_encode((string) $background), Image::IMAGICK)); |
|
| 254 | } |
|
| 255 | ||
| 256 | public function resizeByBlurBackground(int $width, int $height): ImageInterface |
|
| 257 | { |
|
| 258 | $background = new Image(base64_encode((string) $this)); |
|
| 259 | $background->resize($width, $height)->blur(); |
|
| 260 | ||
| 261 | return $this->setBackground($width, $height, $background); |
|
| 262 | } |
|
| 263 | ||
| 264 | /** |
|
| 265 | * @param int $level |
|