setStrokeAntialias (true); $this->setStrokeColor ($color); $this->setStrokeWidth ($width); $this->setFillColor ($fill); if ($color == "none" or $color == "transparent") $this->setStrokeAlpha (0); else $this->setStrokeAlpha ($trans); } } function convert_array_xy ($old_array) { $caxy = array (); for ($i = 0; $i < count ($old_array) / 2; $i++) if (isset ($old_array[2 * $i + 1])) $caxy[] = array ('x' => $old_array[2 * $i], 'y' => $old_array[2 * $i + 1]); return $caxy; } function checkdata ($defaults) { global $data; if (!is_array ($defaults)) $defaults = array ($defaults); foreach ($defaults as $i=>$default) if (!isset ($data[$i + 1])) $data[$i + 1] = $default; } function find_channel ($cnst) { switch ($cnst) { case "red" : $cnst = 1; break; case "gray" : $cnst = 2; break; case "cyan" : $cnst = 3; break; case "green" : $cnst = 4; break; case "magenta" : $cnst = 5; break; case "blue" : $cnst = 6; break; case "yellow" : $cnst = 7; break; case "alpha" : $cnst = 8; break; case "opacity" : $cnst = 9; break; case "matte" : $cnst = 10; break; case "black" : $cnst = 11; break; case "index" : $cnst = 12; break; case "all" : $cnst = 13; break; case "default" : $cnst = 14; break; default: $cnst = 0; } return $cnst; } function brightness ($cstring, $amount) { $amount = min (100, $amount); $amount = max (-100, $amount); $cl = new ImagickPixel ($cstring); $carray = $cl->getColor (); if ($amount > 0) $red = round ($carray["r"] + $amount * (255 - $carray["r"]) / 100); else $red = round ($carray["r"] * (1 + $amount / 100)); if ($amount > 0) $green = round ($carray["g"] + $amount * (255 - $carray["g"]) / 100); else $green = round ($carray["g"] * (1 + $amount / 100)); if ($amount > 0) $blue = round ($carray["b"] + $amount * (255 - $carray["b"]) / 100); else $blue = round ($carray["b"] * (1 + $amount / 100)); $clv = "rgb($red,$green,$blue)"; delete_images ($cl); return $clv; } function delete_images ($imagick_array) { if (!is_array ($imagick_array)) $imagick_array = array ($imagick_array); foreach ($imagick_array as $imagick) { $imagick->clear (); $imagick->destroy (); } } function delete_files ($files) { if (!is_array ($files)) $files = array ($files); foreach ($files as $file) unlink ($file); } extract ($_POST); $b = "\r\n"; date_default_timezone_set ("Europe/Berlin"); echo "$b"; echo "
$b"; echo "