note 94675 added to function.imagettfbbox
| From: | DavidArielBloomberg at osu1 dot php dot net | Date: | Tue, 17 Nov 2009 19:31:23 +0000 |
| Subject: | note 94675 added to function.imagettfbbox | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-163007@lists.php.net to get a copy of this message | ||
I wanted 2 scripts to create alphanumeric watermarks on uploaded images. I couldn't exactly
found what I was looking for but thanks for your great examples. So here the compilation I wrote:
The first script: "_autoblocsizer.php" - The image bloc is generated to exactly match with
your text string, whatever the font type, the font size, etc. (it works for latin char.)
The second script: "_autofontsizer.php" is the inverse: it automatically match the correct
font size regarding the dimension you provided for your bloc.
you can use them as:
insert your values in place otherwise you will get the automatic values!
_autoblocsizer.php?str=&font=&size=&$angle=&alpha=
_autofontsizer.php?str=&font=&alpha=&w=&h=
*** consider two missing elements you can add with "_autofontsizer.php":
- a script to re-center the text into the given dimensions bloc.
- a script to pre-evaluate the font size before the loop for{ } - (and reduce the loop size)
it should considerably reduce the processing time, important if you have millions processes as I
have to your application platform.
----
Server IP: 92.48.74.199
Probable Submitter: 81.39.35.111
----
Manual Page -- http://www.php.net/manual/en/function.imagettfbbox.php
Edit -- https://master.php.net/note/edit/94675
Del: integrated -- https://master.php.net/note/delete/94675/integrated
Del: useless -- https://master.php.net/note/delete/94675/useless
Del: bad code -- https://master.php.net/note/delete/94675/bad+code
Del: spam -- https://master.php.net/note/delete/94675/spam
Del: non-english -- https://master.php.net/note/delete/94675/non-english
Del: in docs -- https://master.php.net/note/delete/94675/in+docs
Del: other reasons-- https://master.php.net/note/delete/94675
Reject -- https://master.php.net/note/reject/94675
Search -- https://master.php.net/manage/user-notes.php