Touch/mouse over to see original View modified in new window.
Image
Dither method
function remapImage($imagePath, $ditherMethod)
{
    $imagick = new \Imagick(realpath($imagePath));
    $palette = new \Imagick(realpath("images/NetscapeWebSafeColours.gif"));
    $imagick->remapImage($palette, $ditherMethod);
    header("Content-Type: image/png");
    echo $imagick->getImageBlob();
}