Image effects like blur and recoloring with Imagine

Code
<?php

use Imagine\Image\Metadata\MetadataBag;
use 
Imagine\Image\Palette\RGB as C;
use 
Imagine\Image\Palette\Color\RGB;
use 
Imagine\Gd\Image;

$imgPath 'php_logo.png';

$resource imagecreatefrompng($imgPath);
$image = new Image($resource, new C(), new MetadataBag());

// original
$original base64_encode($image->get('png'));

// get effects object for resource
$effects $image->effects();

$effects->blur();

$rgbValues = [10025550];
$alpha 0;
$rgb = new RGB(new C(), $rgbValues$alpha);
$effects->colorize($rgb);

$effects->gamma(4);

// changed image
$changed base64_encode($image->get('png'));

echo 
'original:<br><img src="data:image/png;base64,' $original '">' PHP_EOL;
echo 
'effects:<br><img src="data:image/png;base64,' $changed '">' PHP_EOL;
Result
original:

effects:
Used Versions
PHP 7.1, Zend 3.0, Symfony 3.2, Laravel 5.2, PHPUnit 5.6, Doctrine 2.6