summaryrefslogtreecommitdiff
path: root/Styles-generator.php
blob: 5ef71b761a8c98d271d56315036f64de8953995d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?

include("Config.php");

define(WIDTH, 150);
define(HEIGHT, 50);

foreach ($Styles as $style => $font)
{
	$img=imagecreatetruecolor(WIDTH, HEIGHT);
	imagealphablending($img, FALSE);
	imagesavealpha($img, TRUE);

	$transparent=imagecolorallocatealpha($img, 255, 255, 255, 127);
	$black=imagecolorallocatealpha($img, 0, 0, 0, 0);

	imagefilledrectangle($img, 0, 0, WIDTH, HEIGHT, $transparent);

	imagettftext($img, 15, 0, 0, HEIGHT * 80/100 , $black, "import/".$font, $style);

	imagepng($img, "./$style.png");
}

?>