Code:
<?php
function modulateImage($imagePath, $hue, $brightness, $saturation) {
$imagick = new \Imagick(realpath($imagePath));
$imagick->modulateImage($saturation, $hue);
header("Content-Type: image/jpg");
echo $imagick->getImageBlob();
}
?>
Pretty much that's an example of the modulateImage