invert() public method

Method to invert the image (create a negative.)
public invert ( ) : Imagick
return Imagick
Example #1
0
<?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();
}