Ich versuche mit der Funktion imagettftext() einem Bild einen Text hinzuzufügen, jedoch bekomme ich die Schrift ncht genau in die MItte wie schaffe ich das?
Aus dem PHP-Manual (Kommentar):
I noticed that PHP's True Type functions do not allow you to create text blocks with multiple lines that automatically adjust for alignment. I wrote a function that will allow you to generate images with multiple lines, control the alignment, and handle rotation. I hope it helps someone.
There was too much code to paste on this message post so you can grab it off of my webserver. I also created an example page so that you can see the code in action.
Example Page:
http://www.PrintsMadeEasy.com/code_samples/php/text_generation.php
Download the Text file:
http://www.PrintsMadeEasy.com /code_samples/php/text_generation.txt
Mit freundlichen Grüßen,
Michael Nagler