From eebd40439db54767852b8774702a8929a7d037cb Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Thu, 11 Dec 2008 14:00:29 +0100 Subject: [STYLES] Generator --- Styles-generator.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Styles-generator.php diff --git a/Styles-generator.php b/Styles-generator.php new file mode 100644 index 0000000..5ef71b7 --- /dev/null +++ b/Styles-generator.php @@ -0,0 +1,24 @@ + $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"); +} + +?> -- cgit v1.2.3