Skip to content

Commit 49fac8d

Browse files
committed
Silently ignore the value of the $filter parameter of Gd\Image::resize()
1 parent 21cc7bf commit 49fac8d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/Gd/Image.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,12 @@ final public function paste(ImageInterface $image, PointInterface $start, $alpha
184184
/**
185185
* {@inheritdoc}
186186
*
187+
* Please remark that GD doesn't support different filters, so the $filter argument is ignored.
188+
*
187189
* @see \Imagine\Image\ManipulatorInterface::resize()
188190
*/
189191
final public function resize(BoxInterface $size, $filter = ImageInterface::FILTER_UNDEFINED)
190192
{
191-
if ($filter !== ImageInterface::FILTER_UNDEFINED) {
192-
throw new InvalidArgumentException('Unsupported filter type, GD only supports ImageInterface::FILTER_UNDEFINED filter');
193-
}
194-
195193
$width = $size->getWidth();
196194
$height = $size->getHeight();
197195

0 commit comments

Comments
 (0)