Mes emblèmes de Mario Kart DS

Voici mes meblèmes de mario kart DS.
Certains ont été crée grâce au ogiciel DS meet     :   http://www.dsmeet.com/decalmaker/

  J'ai du rajouter du vert pour cet emblème  


Mariokart Decal Maker

Browse for an image:




2005
Script by IRbaboon, Template by Kirbu
source
FAQ
"); } //Load the source image, accepts png, gif and jpg $link = $_FILES['decal']['tmp_name']; $imagename = $_FILES['decal']['name']; switch(strtolower(substr($imagename, strrpos($imagename,'.')+1))) { case 'png': $source = imagecreatefrompng($link) or die('Problems reading PNG image'); break; case 'gif': $source = imagecreatefromgif($link) or die('Problems reading GIF image'); break; case 'jpeg': case 'jpg': $source = imagecreatefromjpeg($link) or die('Problems reading JPG image'); break; default: die('Imagetype is not supported'); } //Resize picture to 32x32 imagecopyresampled($source, $source, 0, 0, 0, 0, 32, 32, imagesx($source), imagesy($source)); //Load pictures $palette_img = imagecreatefromgif('palette.gif'); $template = imagecreatefromgif('template.gif'); $decal = imagecreate(32, 32); $output = imagecreate(194, 227); imagepalettecopy($decal, $palette_img); //Search per pixel what the nearest color in the palette is for($y = 0; $y < 32; $y++) { for($x = 0; $x < 32; $x++) { $color = imagecolorsforindex($source, imagecolorat($source, $x, $y)); $palettecolor = imagecolorclosesthwb($palette_img, $color[red], $color[green], $color[blue]); imagesetpixel($decal, $x, $y, $palettecolor); } } imagedestroy($palette_img); imagedestroy($source); //Copy the large decal to output imagecopyresized($output, $decal, 0, 33, 0, 0, 194, 194, 32, 32); //Copy the template to output imagecopy($output, $template, 0, 0, 0, 0 , 194, 227); //Copy the preview decal to output imagecopy($output, $decal, 153, 1, 0, 0 , 32, 32); //output header('Content-type: image/gif'); imagegif($output); //Cleanup imagedestroy($template); imagedestroy($decal); imagedestroy($output); ?>