Jump to content

Archived

This topic is now archived and is closed to further replies.

marcus

Is This Possible?

Recommended Posts

Is it possible to include PHP in an image file, like PNG, GIF, JPG, JPEG, BMP... etc...?

Like if I wanted to echo a number in an image, but keep the extension png, gif, jpg etc...

Share this post


Link to post
Share on other sites
Images aren't in text format so you can't echo the text. You can use imagettftext() or similar functions to write text into an image.

Share this post


Link to post
Share on other sites
Um, google "imagettftext"

Share this post


Link to post
Share on other sites
Well I wanted to know if it was possible to make a png file use php?

Share this post


Link to post
Share on other sites
An image file doesn't [b]use[/b] anything. As brendandonhue stated you can use imagettftext() or similar functions to use PHP to add text or manipulate an image.

http://us3.php.net/imagettftext

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.