diff options
author | Hugues Hiegel <hugues@hiegel.fr> | 2008-12-11 14:00:29 +0100 |
---|---|---|
committer | Hugues Hiegel <hugues@hiegel.fr> | 2008-12-11 14:00:29 +0100 |
commit | eebd40439db54767852b8774702a8929a7d037cb (patch) | |
tree | 80fc611d4f5430973d6f8ee175be67b23bab540a | |
parent | d8084dadad51cdde9325505badff30c3ad1388bc (diff) |
[STYLES] Generator
-rw-r--r-- | Styles-generator.php | 24 |
1 files changed, 24 insertions, 0 deletions
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 @@ +<? + +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"); +} + +?> |