summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Styles-generator.php24
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");
+}
+
+?>