Need HELP - Picture on picture

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
aLf
Forum Newbie
Posts: 4
Joined: Sun Nov 13, 2005 3:58 am

Need HELP - Picture on picture

Post by aLf »

Hi all !

I have bens msnbot sig but it shows only as small MSN logo picture !

Now I want to put that little MSN Status image on background, using PHP if its possible !

here is what I mean:
Image


Anyone can help me ????

Thank you in advance!
foobar
Forum Regular
Posts: 613
Joined: Wed Sep 28, 2005 10:08 am

Post by foobar »

Wrong forum, should be in Client-Side.

To answer your question, though:

Code: Select all

<!--
  Replace width & height CSS definitions
  with the actual width & height of your
  background image.
-->
<style type="text/css">
#mydiv {
  width: 100px;
  height: 40px;
  background-image: url(background_image.png);
}
</style>

<div id="mydiv"><img src="msn_icon.gif" alt="" /></div>
Now, you could do this with PHP, but there's no point. If you want to do it anyway, you'll have to use GD.
aLf
Forum Newbie
Posts: 4
Joined: Sun Nov 13, 2005 3:58 am

Post by aLf »

I forgot to say:

I want it to act as png, becaose I want to use it on forum sigs, so it has to be done using PHP, and GD!


Sorry fo forgoting to say this in first post...
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

foobar wrote:Wrong forum, should be in Client-Side.
Moved!
aLf
Forum Newbie
Posts: 4
Joined: Sun Nov 13, 2005 3:58 am

Post by aLf »

Does anyone can help me ... ???

:(
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

Code: Select all

$icon = imagecreatefrompng("icon.png");
$background = imagecreatefrompng("background.png");
imagecopy($background,$image,5,5,0,0,imagesx($icon),imagesy($icon));
header("Content-type: image/png");
imagepng($background);
(Untested code .. straight from my head .. might not work)
Post Reply