954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

code of image genration

take a look on image this is image u can find in every daniweb member's profile

now i want the code to create this image can anybody have.

thank in advance

Attachments posts285095.jpg 6.23KB
nikesh.yadav
Posting Whiz in Training
219 posts since Feb 2008
Reputation Points: 15
Solved Threads: 21
 

hello nikesh...

that image having a back ground image is same for all...
and the text (name,posts,solved threads) will coming from database and also an image of ours(avatar)...
i think nothing hard to do this....

Shanti C
Posting Virtuoso
1,642 posts since Jul 2008
Reputation Points: 137
Solved Threads: 162
 

ya
that i know
but i need code in php bcoz i also worked for same but ht clearance is not so good as this image have

nikesh.yadav
Posting Whiz in Training
219 posts since Feb 2008
Reputation Points: 15
Solved Threads: 21
 

code is somehow like

$my_img = imagecreate( 260, 69 );
$background = imagecolorallocate( $my_img, 255, 255, 255 );
$text_colour = imagecolorallocate( $my_img, 246, 128, 30 );
imagestring( $my_img,5,80, 25, "Nikesh Kumar Yadav", $text_colour );
header( "Content-type: image/png" );

// Create image instances
$dest = imagecreatefromgif('logo.gif');
// Copy and merge
imagecopymerge($my_img, $dest, 0, 0, 0, 0, 264, 69, 75);

// Output and free free from memory
header('Content-Type: image/gif');
imagegif($my_img);
imagecolordeallocate( $text_color );
imagecolordeallocate( $background );
imagedestroy( $my_img );
imagedestroy($dest);
nikesh.yadav
Posting Whiz in Training
219 posts since Feb 2008
Reputation Points: 15
Solved Threads: 21
 

some thing goes like that....

<table width="30%" border="0" background="some.gif">
  <tr>
    <td colspan="2" ><? echo $row['name'];?></td>
  </tr>
  <tr>
    <td colspan="2"><? echo $row['identity'];?></td>
  </tr>
  <tr>
    <td ><img src="<?=$row['identity'];?>" /></td>
	<td><? echo $row['posts'];?></td>
  </tr>
</table>
Shanti C
Posting Virtuoso
1,642 posts since Jul 2008
Reputation Points: 137
Solved Threads: 162
 

no its not
bcoz

when u save the image u got as i showoff in my post if it was a background it was save only background image think and help me

nikesh.yadav
Posting Whiz in Training
219 posts since Feb 2008
Reputation Points: 15
Solved Threads: 21
 

i don't get what you said..
Make me clear...

Shanti C
Posting Virtuoso
1,642 posts since Jul 2008
Reputation Points: 137
Solved Threads: 162
 

k
wait

nikesh.yadav
Posting Whiz in Training
219 posts since Feb 2008
Reputation Points: 15
Solved Threads: 21
 
i don't get what you said.. Make me clear...

dear Shanti,
please find the difference of images one is the original image without text any picture but daniweb programmer write code and type text and picture on it using php createimagefromjpeg() function [ which is part of php gd ] and merge these two things i want that code bcoz i m also trying to create image by same type of method.

Attachments profilepic285095_4.gif 15.33KB profilepic285095_5.gif 6.53KB
nikesh.yadav
Posting Whiz in Training
219 posts since Feb 2008
Reputation Points: 15
Solved Threads: 21
 

shanti ignore last post

Sorry i attach wrong image please check this

i don't get what you said.. Make me clear...

dear Shanti,
please find the difference of images one is the original image without text any picture but daniweb programmer write code and type text and picture on it using php createimagefromjpeg() function [ which is part of php gd ] and merge these two things i want that code bcoz i m also trying to create image by same type of method.

Attachments posts285095.jpg 6.23KB profilepic285095_5.gif 6.53KB
nikesh.yadav
Posting Whiz in Training
219 posts since Feb 2008
Reputation Points: 15
Solved Threads: 21
 

ok.......

Shanti C
Posting Virtuoso
1,642 posts since Jul 2008
Reputation Points: 137
Solved Threads: 162
 

i think now u r ready to help me.............

nikesh.yadav
Posting Whiz in Training
219 posts since Feb 2008
Reputation Points: 15
Solved Threads: 21
 

hello try this code once:

$photo= imagecreatefromjpeg($image_file);
$fotoW = imagesx($photo);
$fotoH = imagesy($photo);

$photoFrame = imagecreatetruecolor(600,338);

$logoImage = imagecreatefrompng('logo.png');
imagecopyresampled($photoFrame, $photo, 0, 0, 0, 0, 600, 338, $fotoW, $fotoH);


$logoW = imagesx($logoImage); 
$logoH = imagesy($logoImage); 

imagecopy($photoFrame, $logoImage, 0, 0, 0, 0, $logoW, $logoH);

imagejpeg($photoFrame, '', 100);
Shanti C
Posting Virtuoso
1,642 posts since Jul 2008
Reputation Points: 137
Solved Threads: 162
 

i m trying

nikesh.yadav
Posting Whiz in Training
219 posts since Feb 2008
Reputation Points: 15
Solved Threads: 21
 

or check this attatchment...

Attachments ICMcode.zip (15.07KB)
Shanti C
Posting Virtuoso
1,642 posts since Jul 2008
Reputation Points: 137
Solved Threads: 162
 

shanti,
i worked some what i will try more

nikesh.yadav
Posting Whiz in Training
219 posts since Feb 2008
Reputation Points: 15
Solved Threads: 21
 

hi shanti ,
the attach file give me a so good output.

now i m trying to create my own image that i need

thanx

nikesh.yadav
Posting Whiz in Training
219 posts since Feb 2008
Reputation Points: 15
Solved Threads: 21
 

welcome....:)

Shanti C
Posting Virtuoso
1,642 posts since Jul 2008
Reputation Points: 137
Solved Threads: 162
 

ok shati thakx its done

nikesh.yadav
Posting Whiz in Training
219 posts since Feb 2008
Reputation Points: 15
Solved Threads: 21
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You