custom image generator
I uploaded the font here:
http://rapidshare.de/files/18372514/bla ... r.zip.html
About the image, just use <img border="0" ...
http://rapidshare.de/files/18372514/bla ... r.zip.html
About the image, just use <img border="0" ...
Code: Select all
define('I_LOVE_PHP', true);
-
- Posts: 78
- Joined: Sun Feb 26, 2006 4:21 pm
[quote="mohumben"]I uploaded the font here:
http://rapidshare.de/files/18372514/bla ... r.zip.html
About the image, just use
/\ i dont see that there... i would've tried that before, duuh :lol:
http://rapidshare.de/files/18372514/bla ... r.zip.html
About the image, just use
/\ i dont see that there... i would've tried that before, duuh :lol:
Visit derangedtaco.com, a developing online community.
Hi
Interesting
Might have to invest with some of this PHP technology.
Might have to invest with some of this PHP technology.
-
- Posts: 78
- Joined: Sun Feb 26, 2006 4:21 pm
-
- Posts: 78
- Joined: Sun Feb 26, 2006 4:21 pm
ok! done..
http://www.derangedtaco.com/files/conversion.zip
can you config that to write a custom value in where the blank area is? with the included font? dunno that would be hard...
a futile attempt for the form...
<form><
you know what, i can't even think of how to start. would that need to use POST? oh, god, somebody help me
http://www.derangedtaco.com/files/conversion.zip
can you config that to write a custom value in where the blank area is? with the included font? dunno that would be hard...
a futile attempt for the form...
<form><
you know what, i can't even think of how to start. would that need to use POST? oh, god, somebody help me
Visit derangedtaco.com, a developing online community.
-
- Posts: 78
- Joined: Sun Feb 26, 2006 4:21 pm
here:
http://geopet4.hollosite.com/img.php?text='YOUR TEXT HERE'
http://geopet4.hollosite.com/img.php?text='YOUR TEXT HERE'
Code: Select all
<?php
// Set the content-type
header("Content-type: image/png");
// Create the image
$im = @imagecreatefrompng('diploma.png');
// Create some colors
$black = ****($im, 0, 0, 0);
// Set the enviroment variable for GD
putenv('GDFONTPATH=' . realpath('.'));
// Name the font to be used (note the lack of the .ttf extension)
$font = 'blackletter';
//$font = '/www/geopet4.hollosite.com/blackletter.TTF';
// The text to draw. It will use the $_GET['text']
$text = (empty($_GET['text'])) ? 'img.php?text=name_here' : $_GET['text'];
// This defines the X postion by calculating where the center is
$imgar = imagettfbbox (30, 0, $font, $text);
$imgX = ceil(((499 - abs($imgar[0] - $imgar[2]))/2)) + 2;
// Y position
$imgY = 215;
// Add the text
imagettftext($im, 30, 0, ($imgX + 1) , ($imgY - 1), $black, $font, $text);
// Output and Destroy image resource
imagepng($im);
imagedestroy($im);
?>
Code: Select all
define('I_LOVE_PHP', true);
-
- Posts: 78
- Joined: Sun Feb 26, 2006 4:21 pm
nice..
but:
1. how to make the text bigger
2. how to integrate with a form. ex user types in their name, it goes there
edit: yup, was lookin here
http://www.tizag.com/phpT/forms.php
i could try to do it, but i would almost certainly fail. just a tad of help pls
but:
1. how to make the text bigger
2. how to integrate with a form. ex user types in their name, it goes there
edit: yup, was lookin here
http://www.tizag.com/phpT/forms.php
i could try to do it, but i would almost certainly fail. just a tad of help pls
Visit derangedtaco.com, a developing online community.
Form integration:
Font Size:
Code: Select all
<form action="http://geopet4.hollosite.com/img.php" method="get">
<input type="text" name="text"> <input type="submit" value="Go">
</form>
Code: Select all
imagettftext($im, [SIZE HERE], 0, ($imgX + 1) , ($imgY - 1), $black, $font, $text);
Code: Select all
define('I_LOVE_PHP', true);
-
- Posts: 78
- Joined: Sun Feb 26, 2006 4:21 pm
ok, i'm just using your server to generate the custom images.
will it hold any bandwidth? will it stay up?
thanks for all the help.
ok, and, if you could change the font for the custom text to arial or something... anything that's clearer. e-mail me after you complete this, or e-mail me if you cannot.
alternatively to all of that, you could send over all of the stuff i need in a .zip file. all set up and ready to go. i just extract, upload, and it works. i'm too stupid to do it myself. :x
lol ok, so thanks for all your help.. look forward to your reply
hey why doncha just email me derangedtaco@gmail.com pls
will it hold any bandwidth? will it stay up?
thanks for all the help.
ok, and, if you could change the font for the custom text to arial or something... anything that's clearer. e-mail me after you complete this, or e-mail me if you cannot.
alternatively to all of that, you could send over all of the stuff i need in a .zip file. all set up and ready to go. i just extract, upload, and it works. i'm too stupid to do it myself. :x
lol ok, so thanks for all your help.. look forward to your reply
hey why doncha just email me derangedtaco@gmail.com pls
Visit derangedtaco.com, a developing online community.