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