メインコンテンツまでスキップ
Version: Fegg 5.x(開発版)

Trim::view

Output the saved image to the browser

Description​

public void Trim::view()

Sends the Content-type header and outputs the file at the output path. Call Trim::create first: nothing is output when the file does not exist.

Example​

Controller
use Fegg\Tool\Trim;

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

$trim->resizeTrim(300, 300, 'm');
$trim->create();
$trim->view();