error_reporting(0); include("functions.php"); $h1 = "DJ Mike's Image Maker 2"; $h2 = "Oil Paint"; ##### Start Oil Paint if ( $_GET[oilpaint] ) { $oilpaint = trim($_GET[oilpaint]); ##### Validate degrees if ( preg_match( "#[^0-9\-]#", "$oilpaint", $x) ) { $_SESSION[error] = "Degrees have numbers only"; header("location:$self"); exit; } ############# $image = new Imagick($_SESSION[path]); $image->OilPaintimage($oilpaint); foreach ($image as $frame) { $frame->OilPaintimage($oilpaint); } $format = strtolower( $image->getimageformat() ); $path = "temp/$ID.$_SESSION[views].$format"; $frames = $image->getNumberImages(); if ( $frames > 1) { $image->writeImages("$path", TRUE); } else { $image->writeImage("$path"); } # save settings $_SESSION[path] = $path; $_SESSION[oilpaint] = $oilpaint; header("location:display.php"); exit; } ######### end Oil Paint include("top.php"); ?>
Applies a special effect filter that simulates an oil painting. Each pixel is replaced by the most frequent color occurring in a circular region defined by radius.