Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Make Image

Status
Not open for further replies.

jonybd

Programmer
Joined
Nov 3, 2002
Messages
166
Location
BE
how to make a Image Generator ? We will input our text and it will create a bmp, jpg picture
automaticaly ?

For example

Our Entry as following:
'''''''''''''''''''''''''''''''''
1. Input text: 2. Select BackGround = Black
3. Select Font Color = Blue

'''''''''''''''''''''''''''''''''

'''''''''''''''''
' Submit Button '
' '
'''''''''''''''''

Final Preview Now
'''''''''''''''''''''''''''''''''
' '
' '
' '
' '
'''''''''''''''''''''''''''''''''


Final Preview can be save in to mysql database as picture

How to do that ? any website link any tutorial or any function that will
do the job ?

Please help.
 
I just asked the following thing.. , but anyone know how to
add
$im to Adodb.recordset ? without doing
ImagePNg($im, "pic.png") ? i tryed
$strm = new Com("Adodb.Stream");
$strm->type = 1;
$strm->open();
$strm->loadfromfile("pic.png");
$rs0 = $rs->Fields("Pic");
$rs0->Value = $strm->Read();
But it says cgi error ,

so i did
/*
***********************************
working fine
$fPath = realpath("pic.png");
$fp = fopen($fPath, "rb");
$sucks = mysql_escape_string(fread($fp, filesize($fPath)));
$db_rs->open("INSERT INTO table(Pic) Values ('$sucks')" , $db_conn);
*************************************
*/

<?php
header(&quot;Content-type: image/png&quot;);
$im = imagecreate(400,30);
$white = imagecolorallocate($im, 255,255,255);
$black = imagecolorallocate($im, 0,0,0);

// Replace path by your own font path
imagettftext($im,11, 0, 10, 20, $black, &quot;D:\Windows\Fonts\Impact.ttf&quot;, &quot;Testing...&quot;);
imagepng($im);
imagedestroy($im);
?>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top