<?php
require_once '../../bootstrap.php';
use Pop\Color\Space\Rgb;
use Pop\Image\Imagick;
try {
$imagick = new Imagick('../assets/images/test.jpg');
$imagick->invert()->swirl(90)->save('../tmp/test.jpg');
// Calling the destructor destroys the image resource as well
unset($imagick);
echo 'Image saved.';
} catch (\Exception $e) {
echo $e->getMessage();
}