| @@ 84-94 (lines=11) @@ | ||
| 81 | /** |
|
| 82 | * {@inheritdoc} |
|
| 83 | */ |
|
| 84 | public function withFormat($format) |
|
| 85 | { |
|
| 86 | if (!in_array($format, static::$supportedFormats)) { |
|
| 87 | throw new RuntimeException('Unsupported image format'); |
|
| 88 | } |
|
| 89 | ||
| 90 | $image = clone $this; |
|
| 91 | $image->gmagick->setimageformat($format); |
|
| 92 | ||
| 93 | return $image; |
|
| 94 | } |
|
| 95 | ||
| 96 | /** |
|
| 97 | * {@inheritdoc} |
|
| @@ 84-94 (lines=11) @@ | ||
| 81 | /** |
|
| 82 | * {@inheritdoc} |
|
| 83 | */ |
|
| 84 | public function withFormat($format) |
|
| 85 | { |
|
| 86 | if (!in_array($format, static::$supportedFormats)) { |
|
| 87 | throw new RuntimeException('Unsupported image format'); |
|
| 88 | } |
|
| 89 | ||
| 90 | $image = clone $this; |
|
| 91 | $image->imagick->setImageFormat($format); |
|
| 92 | ||
| 93 | return $image; |
|
| 94 | } |
|
| 95 | ||
| 96 | /** |
|
| 97 | * {@inheritdoc} |
|