Output to browser
This simple example shows how to resize an image and output it directly to the browser. Bare in mind that the code needs security checks, which I left out for brevity.
The file name of the image is read from img GET parameter.
$img = WideImage::load($_GET['img']);
The image is resized …
$resized = $img->resize(500, 300);
And output to browser in JPG format with quality set to 90%.
All this can be done as a one-liner:
WideImage::load($_GET['img'])->resize(500, 300)->output('jpg', 90);