550) { $error .= "Width must be from 0 to 550
"; } if ( $y>550) { $error .= "Height must be from 0 to 550
"; } if ( $error ) { $_SESSION[error] = "$error"; header("location:$self"); exit; } $image = new Imagick(); if ( $_GET[fractal] ) { $image->newPseudoImage( $x, $y, "plasma:fractal" ); } if ( $_GET[color] ) { ## validate color ## $fractal_color_1 = trim( $_GET[fractal_color_1] ); $fractal_color_1 = colors( $fractal_color_1, "validate" ); if ( !$fractal_color_1 ) { $error .= "Color 1 is invalid
"; exit; } ## end validate ## ## validate color 2 ## $fractal_color_2 = trim( $_GET[fractal_color_2] ); $fractal_color_2 = colors( $fractal_color_2, "validate" ); if ( !$fractal_color_2 ) { $error .= "Color 2 is invalid
"; exit; } ## end validate ## if ( $error ) { $_SESSION[error] = "$error"; header("location:$self"); exit; } ## end validate $image->newPseudoImage( $x, $y, "plasma:$fractal_color_1-$fractal_color_2" ); } $image->setImageFormat($_GET[plasma_format]); $path = "temp/$ID.$_SESSION[views].$_GET[plasma_format]"; $image->writeimage("$path"); $_SESSION[path] = $path; $_SESSION[format] = "$_GET[plasma_format]"; $_SESSION[plasma_x] = $x; $_SESSION[plasma_y] = $y; $_SESSION[fractal_color_1] = $_GET[fractal_color_1]; $_SESSION[fractal_color_2] = $_GET[fractal_color_2]; header("Location: display.php"); exit; } include("top.php"); ?>
"> X ">
Color 1: ">
Color 2: ">

Create a new plasma image. Enter width, height and image format. For color plasma, colors can be named colors like red or a hex like #0000ff.