Page 1 of 1
Need HELP - Picture on picture
Posted: Sat Nov 26, 2005 9:20 am
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:
Anyone can help me ????
Thank you in advance!
Posted: Sat Nov 26, 2005 9:52 am
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.
Posted: Sat Nov 26, 2005 9:57 am
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...
Posted: Sat Nov 26, 2005 10:24 am
by Roja
foobar wrote:Wrong forum, should be in Client-Side.
Moved!
Posted: Mon Nov 28, 2005 9:39 am
by aLf
Does anyone can help me ... ???

Posted: Mon Nov 28, 2005 10:04 am
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)