Page 1 of 3
custom image generator
Posted: Tue Apr 04, 2006 4:10 am
by derangedtaco
how can i make an image with variable content? like, for example, have a picture of a taco and say the viewer's IP on it. just as an example...
how could i do it? oh and it needs to be custom.. so there should be an input where the user can put in their name... can anybody help me?
Posted: Mon Apr 17, 2006 3:53 am
by mohumben
Well, use Image Functions (requires a library called GD; to check if your server has it installed use phpinfo(); )
Code: Select all
<?php
header("Content-type: image/png");
$image = @imagecreatefromjpeg('taco.jpg');
$color = ****($image, 0, 0, 255);
imagestring($image, 5, 20, 80, 'Hey, your IP address is:' , $color);
imagestring($image, 5, 80, 140, $_SERVER['REMOTE_ADDR'] , $color);
imagepng($image);
imagedestroy($image);
?>
Before:

After:

Posted: Mon Apr 17, 2006 3:58 am
by derangedtaco
hey, wow. i didnt think anyone was going to help me out. thanks!!!
now, can anybody help me out with this?? i need a blank diploma-like thing.. for papapotato.com. you'll enter in your name to convert, then it'll have your name on the certificate afterwards :lol:
Posted: Mon Apr 17, 2006 4:15 am
by mohumben
Oh, sure.
Give me your layout and the fonts you want to use... I think I can code the script
I just need a template; the place where the variables are going to be printed should be obviously blank...
Posted: Mon Apr 17, 2006 5:11 am
by mohumben
OK, found some Google'd some images... What resulted in:
You can change it's name... Is this your idea?
Posted: Mon Apr 17, 2006 12:30 pm
by iPod Wizard
Wow, you're really good at this stuff...hope you can do more...
Posted: Mon Apr 17, 2006 2:30 pm
by derangedtaco
w00t w00t perfect!!! photoshopping now, i'll get back to you
edit.... hmm... i need a good font like that.. do you know which one they used, or can you give me a link to something like it, please?
Posted: Mon Apr 17, 2006 3:55 pm
by mohumben
The top (where it says "Php University") one is Grafik Text, the handwriting cursive one is AdineKinberg-Script, and the other is Blackletter686 BT.
They are all free fonts AFAIK so you should be able to download them.
Posted: Mon Apr 17, 2006 10:55 pm
by derangedtaco
mohumben wrote:The top (where it says "Php University") one is Grafik Text, the handwriting cursive one is AdineKinberg-Script, and the other is Blackletter686 BT.
They are all free fonts AFAIK so you should be able to download them.
looks like you have to pay for blackletter
http://www.myfonts.com/PurchaseOptions?id[]=1031
or is it something else you're talking about? a free "clone" maybe?
Posted: Wed Apr 19, 2006 2:18 am
by derangedtaco
any help...?
also...... just another quickie question
http://papapotato.com/index.php?option= ... &Itemid=43
the border around the "convert now" image... how can i kill that? it's in the css, right?