Потеряшка.))
[cswow.git] / images / player_info / arena_small_ico.php
blob1fa567db707b91d08ecd920296ca6259f2956f54
1 <?php
2 $type = intval(@$_REQUEST['type']);
3 $bground = intval(@$_REQUEST['back']);
4 $emblemid = intval(@$_REQUEST['emblem']);
5 $ecolor = intval(@$_REQUEST['ecolor']);
6 $borderid = intval(@$_REQUEST['border']);
7 $bcolor = intval(@$_REQUEST['bcolor']);
9 header("Content-type: image/png");
11 $emblem = imagecreatefrompng("arenateam/PVP-Banner-Emblem-".$emblemid.".png");
12 for ($x=0;$x<128;$x++)
13 for ($y=0;$y<128;$y++)
15 $color_img = imagecolorat($emblem, $x, $y);
16 $res = ($color_img & 0xFF000000) | $ecolor;
17 imagesetpixel($emblem, $x, $y, $res);
19 imagesavealpha($emblem, true);
21 $back = imagecreatetruecolor(128, 128);
22 imagefill($back,0,0,$bground);
23 imagecopy($back,$emblem,0,0,0,0,128,128);
25 imagepng($back);
27 imagedestroy($back);
28 imagedestroy($emblem);