PNG Image Creation

GD and GD2 are useful libraries for creating graphics on-the-fly. Discuss your PHP GD and GD2 scripts here.

Moderators: onion2k, General Moderators

PNG Image Creation

Postby jlauffer » Fri Feb 19, 2010 7:42 am

Good morning all,

I have been assigned a job to create a PHP Script that will take a Television News Graphic and add 2 Lines of Text to it. (The things that show the persons name on the bottom of the screen)

I was wondering what kind of GD Script I would need to make a transparent image from text that is supplied in a form, to combine on the graphic and make the finished product.

Please help, this is due very soon and I am clueless. My AIM is Justin34238SRQ if you'd like to IM me there.
jlauffer
Forum Newbie
 
Posts: 1
Joined: Fri Feb 19, 2010 7:37 am

Re: PNG Image Creation

Postby greyhoundcode » Mon Jun 28, 2010 3:19 pm

It should be fairly simple, the functions you are likely to need include ImageCreateFromPNG(), ImageString() and ImagePNG().

As a minimum all you need to do is load your "news graphic", add the relevant string of text and then spit it back out as a PNG (or JPEG or whatever).

Of course, for more polished results, you might want to split up the text according to image width etc.

How far have you got so far?
User avatar
greyhoundcode
Forum Regular
 
Posts: 611
Joined: Mon Feb 11, 2008 5:22 am


Return to PHPGD.com

Who is online

Users browsing this forum: xinxinyt and 1 guest