Fixes #2204

Hello

Quick fix for #2204.

But here my thoughts about this extension :
*  there should be an options param, instead of $mode, e.g. : 
```php
public static function thumbnail($filename, $width, $height, $options = [])
{
}
```
* I don't see the meaning of frame function
* there should be an `open` function to quickly create an ImageInterface