Потеряшка.))
[cswow.git] / images / player_info / guild_ico.php
blob9fece4d87f269c2e48513d46605784630db2e9ba
1 <?php
2 header("Content-type: image/png");
3 $backid = $_REQUEST['back'];
4 $emblemid = $_REQUEST['emblem'];
5 $emblemc = $_REQUEST['ecolor'];
6 $borderid = $_REQUEST['border'];
7 $borderc = $_REQUEST['bcolor'];
9 $back = imagecreatefrompng(sprintf("guilds/background_%02d.png",$backid));
10 $border = imagecreatefrompng(sprintf("guilds/border_%02d_%02d.png",$borderid, $borderc));
11 $emblem = imagecreatefrompng(sprintf("guilds/emblem_%02d_%02d.png",$emblemid, $emblemc));
13 imagecopy($back,$border,0,0,0,0,64,96);
14 imagecopy($back,$emblem,0,32,0,0,64,64);
16 $temp = imagecreatetruecolor(96, 96);
17 imagealphablending($temp, false);
18 imagesavealpha($temp, true);
20 imagecopyresampled($temp,$back,0,0,0,0,48,96,64,96);
21 imagecopyresampled($temp,$back,48,0,63,0,48,96,-64,96);
23 imagepng($temp);
25 imagedestroy($back);
26 imagedestroy($border);
27 imagedestroy($emblem);
28 imagedestroy($temp);