note 94675 deleted from function.imagettfbbox by danbrown

From: Date: Tue, 17 Nov 2009 19:34:25 +0000
Subject: note 94675 deleted from function.imagettfbbox by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-163008@lists.php.net to get a copy of this message
Note Submitter: David Ariel Bloomberg ---- 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.

« previous php.notes (#163008) next »