Grafik generieren

Rudi09

New member
24 Mai 2009
1
0
Hi,
ich möchte eine "Fontmap" erstellen, doch leider kommt hier nur sowas raus:
https://img15.myimg.de/fmap933524621c2.gif

In der ersten Zeile sieht noch alles in Ordnung aus, aber dann wirds irgendwie immer schlechter.

Meine Funktion sieht so aus:


$aToken = array('a','b','c','d','e','f','g','h','i','j','k','l','m','n','o',
'p','q','r','s','t','u','v','w','x','y','z');

$im = imagecreatefromstring(file_get_contents('bg.png'));
$black = ImageColorAllocate ($im, 255, 255, 255);
$white = ImageColorAllocate ($im, 55, 55, 55);

for ($i = 0, $x = 0, $y = 1; $i < count($aToken); $i++, $x++, $y++) {
if ($x % 6 === 0) {
$x = 0;
}
ImageTTFText($im, 90, 0, ($x * 105 + 20), ((ceil($y / 6) * 105) - 32), $white, 'font.ttf');
}
$sMap = rand(1,999999);
ImageGif ($im,'dummy.gif');
ImageDestroy ($im);
$this->sCurrentMap = $sMap;
$this->sCurrentFont = $aFont[0];
$this->GenerateFontPreview();