You are here: Re: Centering text in a dynamically created image (GD or ImageMagick). « PHP Programming Language « IT news, forums, messages
Re: Centering text in a dynamically created image (GD or ImageMagick).

Posted by Rik on 07/20/07 18:51

Hey, blast from the past:

On Fri, 20 Jul 2007 20:31:22 +0200, movement_eric <eric.sukalac@gmail.co=
m> =

wrote:
> On Jun 7, 7:49 pm, Rik <luiheidsgoe...@hotmail.com> wrote:
>> >>>> Anyone know offhand how to center atextwithin the bounding box o=
f =

>> an
>> >>>>image(width-wise at least) without the Freetype library?
>>
>> Write your own variant of the freetypre library if it isn't available=
,
>> that's the only solution. There's no other way you can know the width=
of
>> dynamictextwith an arbitrary font. Yes, it's a pain, so if the librar=
y
>> isn't available seriously consider changing hosts and/or change the =

>> server.

> function getTextPosition($text,$center)
> {

....

> $point_array =3D imagettftext($im_tmp,

http://www.php.net/imagettftext
"Notes
Note: This function requires both the GD library and the FreeType librar=
y."

So: no banana. Then again the FreeType library ought to be normally =

available IMO.
-- =

Rik Wasmus

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация