function fixedart($id, $hue) { //include("art.php"); include "fiximg.php"; if ($id[0] == 0) { $id = hexdec($id); } if ($hue[0] == 0) { $hue = hexdec($hue); } $file = "images/art/art_" . $id . "_" . $hue . ".png"; if (!file_exists($file)) { createart($id, $hue, 0); } $file2 = "images/art/fixedart_" . $id . "_" . $hue . ".png"; if (!file_exists($file2)) { fixart($id, $hue, 0); } echo "<img src=\"{$file2}\">"; }
if (!isset($_GET["hue"])) { $hue = 0; } else { $hue = $_GET["hue"]; if ($hue[0] == 0) { $hue = hexdec($hue); } else { $hue = intval($hue); } } if (!file_exists("images/art/art_" . $id . "_" . $hue . ".png")) { include "art.php"; createart($id, $hue, 0); } if (!file_exists("images/art/fixedart_" . $id . "_" . $hue . ".png")) { fixart($id, $hue, 1); } else { Header("Content-type: image/png"); Header("Content-disposition: inline; filename=art_" . $id . "_" . $hue . ".png"); $img = imagecreatefrompng("images/art/fixedart_" . $id . "_" . $hue . ".png"); $black = imagecolorallocate($img, 0, 0, 0); imagecolortransparent($img, $black); imagepng($img); imagedestroy($img); } exit; } function fixart($id, $hue, $show) { if (!file_exists("images/art/fixedart_" . $id . "_" . $hue . ".png")) { if (!file_exists("images/art/art_" . $id . "_" . $hue . ".png")) {