contao/core — Issue #3883: Add FileImage class with resize() method to libraries
Author: DyaGa
Created: 2012-01-30 22:17:41+00:00
State: open

I propose you to create `FileImage` class and move `getImage()` method from `Controller` class to `FileImage` class as `resize()` method:

```php
class FileImage extends File {
...

protected function resize($arrNewSize, $target = null)
{
...take the code from Controller->getImage() method...
}

}
```

So, for image files we can use something like this:

```php

$objImage = new FileImage($strSrc);
$objImage->resize(array(100, 100, 'propotional'), $strTargetSrc);

```

Also, we can use `FileImage` class for getting additional image information, see #3760 (Get more image information from File class)