getFields(); $tmp_data=$tmp->getOneData($fields, array('id'=>$id)); if($tmp_data){ $id=$tmp_data['id']; $img=$tmp_data['image']; }else{ redirect("coloring.php"); } $src = "images/editing/".$img."?NAN"; $src= strstrbi($src, '?', true, false, false); $counter=createcounter(); $colorarray=rgb2hex2rgb("#FFFFFF"); // Create the image handle, set the background to white $im = imagecreatefrompng("$src"); // Set the border and fill colors //$border = imagecolorallocate($im, 0, 0, 0); $fill = imagecolorallocate($im, $colorarray['red'],$colorarray['green'], $colorarray['blue']); // Fill the selection imagefilltoborder($im, $x, $y, $border, $fill); $file="tmp/$activedir/$counter.png"; if (file_exists($file)){ unlink($file); } // Output and free memory //header('Content-type: image/png'); imagepng($im,"$file"); //echo "$file"; ?> Toon Paint
Choose a character