Hallo liebe Forumsteilnehmer,
Ich habe folgende Aufgabenstellung, die scheinbar schon im Ansatz zum Scheitern verurteilt ist.
Ich habe einen Webspace mit Apache 1.3.12, PHP 4.1.2 und Configure Command './configure' '--with-apache=../apache' '--with-mysql=/usr' '--with-openssl' '--with-zlib' '--enable-debug=no' '--enable-safe-mode=no' '--enable-discard-path=no' '--with-gd' '--with-ttf' '--enable-gd-imgstrttf' '--enable-gd-native-ttf' '--with-png-dir=/usr/lib' '--with-jpeg-dir=/usr/lib' '--enable-ftp' '--enable-memory-limit'
Da wir eine "Nichtstandardschrift" fürd Menü einsetzen müssen, wollen wir die Buttons aus PHP als PNG generieren lassen. Eben mit dieser besagten Schrift. Ich habe aber auch schon Standardschriften ausprobiert. Diese rendert mein script aber auch nicht.
Fehlermeldung:
Warning: ImageFontLoad: error reading font in /www/htdocs/humo/text2png2.php on line 6
Warning: Could not find/open font in /www/htdocs/humo/text2png2.php on line 8
PNG
IHDR^-Ü$PLTEÿÿÿ¥ÙÝIDATxc£
Q0
FÁ°éþ«lIEND®B`
Script
<?php
Header ("Content-type: image/png");
$im = ImageCreate (350, 45);
$black = ImageColorAllocate ($im, 0, 0, 0);
$white = ImageColorAllocate ($im, 255, 255, 255);
$font= ImageLoadFont ("COMIC.TTF");
Imagettftext($im, "Testing... It worked!",
$font, 32, $white, $black, 32, 32);
Imagepng($im, "", 100);//for best quality... your mileage may vary
ImageDestroy ($im);
?>
Schönen Gruß aus München
die knappschaft
sh:( fo:| ch:? rl:° br:$,<,> n4:& ie:| mo:| va:) de:] zu:) fl:| ss:| ls:[,#