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

Recommended Answers

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....

Jump to Post

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>
Jump to Post

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

Jump to Post

ok.......

Jump to Post

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);
Jump to Post

All 18 Replies

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....

commented: nice helper, great hardworker ..... you are +1

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

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);

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>

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

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

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.

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.

ok.......

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

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);

i m trying

shanti,
i worked some what i will try more

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

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

thanx

welcome....:)

ok shati thakx its done

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.