Quote:
Originally Posted by DWard
if you look back there is a thing about creating a jpeg and a trurtype function, which was taken off in the new version because that was causing a few troubles.
|
1. I can only make this work with certain colors -- 90% of the graphics I've made convert down to a 16-color "Safe Mode" look. Below is how I have the font code section of the version I loaded from the first post yesterday.
PHP Code:
// ######################### CHANGE FONT BELOW ############################
// Uncomment LINE1+LINE12 and comment LINE2+LINE22 to use default font.
// Replace "verdana.ttf" with the URL to your .ttf font
//
// LINE1
imagestring($img, $fontsize, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $output, $text_color);
//imagettftext($img, $fontsize, 0, $left, (($i * $zeilenabstand) - $zeilenabstand + $top), $text_color, "verdana.ttf", $output); // LINE2
$i++;
}
header("Content-Type: image/png");
imagepng($img);
imagejpeg($img, "$ausgabedatei",$komprimierung); //Write jpg to folder and set compression
imagedestroy($img); // get the image out of memory
?>
</FONT>
My understanding was that I commented to where it takes the default -- but I suck as a programmer and that may be where I'm screwing up. The Line 2 & 22 or 1 & 12 confuse me as to exactly which lines are which. Is that 1, 2, 12, & 22 from the ########### down?
2. I see your sig is a JPG -- are you having a CRON job generate a new image every so often -- and it so, please roll me a bone and tell me how to do that. I visit a lot of phpBB and YaBB boards that I have no control over -- and they do not allow for php images.
This is a very cool hack and if I had more control over which graphics will work and the ability to generate frequent images (I know it isn't real time -- but every 10 minutes would be close enough for Government work) for my members -- it would be too Kool.
Thanx
BK