Skip to main content
Version: Fegg 5.x

Trim::output

Output the image to the browser without saving it

Description​

public void Trim::output()

Sends the Content-Type header of the output type and the resized image, without saving it. Use Trim::create and Trim::view to save it as well.

Example​

Controller
use Fegg\Tool\Trim;

$trim = new Trim();
$trim->setImage('path/to/image.jpg', 'path/to/preview.jpg');

$trim->resize(600, 0);
$trim->output();
$this->halt();