error_reporting(0);
include("functions.php");
$h1 = "DJ Mike's Image Maker 2";
$h2 = "Patterns";
###
$patterns = array(
"bricks",
"checkerboard",
"circles",
"crosshatch",
"crosshatch30",
"crosshatch45",
"fishscales",
"gray0",
"gray5",
"gray10",
"gray15",
"gray20",
"gray25",
"gray30",
"gray35",
"gray40",
"gray45",
"gray50",
"gray55",
"gray60",
"gray65",
"gray70",
"gray75",
"gray80",
"gray85",
"gray90",
"gray95",
"gray100",
"hexagons",
"horizontal",
"horizontalsaw",
"hs_bdiagonal",
"hs_cross",
"hs_diagcross",
"hs_fdiagonal",
"hs_horizontal",
"hs_vertical",
"left30",
"left45",
"leftshingle",
"octagons",
"right30",
"right45",
"rightshingle",
"smallfishscales",
"verticalbricks",
"verticalleftshingle",
"vertical",
"verticalrightshingle",
"verticalsaw");
##
if ( $_GET[pattern] )
{
if ( isset($_GET[pattern_x]) )
{ $x = (int)$_GET[pattern_x]; }
else { $pattern_x = 200; }
if ( $x<1 )
{ $x = 200; }
if ( isset($_GET[pattern_y]) )
{ $y = (int)$_GET[pattern_y]; }
else { $pattern_y = 200; }
if ( $y < 1 )
{ $y = 200; }
$image = new Imagick();
$image->newPseudoImage( $x, $y, "pattern:$_GET[pattern]" );
$image->setImageFormat($_GET[pattern_format]);
$image->setimageBackgroundColor("blue");
$path = "temp/$ID.$_SESSION[views].$_GET[pattern_format]";
$image->writeimage("$path");
$_SESSION[path] = $path;
$_SESSION[pattern_x] = $x;
$_SESSION[pattern_y] = $y;
header("Location: display.php?url=$path");
exit;
}
include("top.php");
?>
Create a new image with a pattern. Width anf height can be from 1 to 550.
|
<$img$pattern1\" class=\"sample\"> $pattern1 |
<$img$pattern2\" class=\"sample\"> $pattern2 |
<$img$pattern3\" class=\"sample\"> $pattern3 |
|
<$img$pattern2\" class=\"sample\"> $pattern2 |
<$img$pattern2\" class=\"sample\"> $pattern2 |