Combining two PNG Images
<p>Right, it took me a while to figure out how to edit this...</p>

<p>Okay, after realising my msitakes, I will attempt again.</p>

<p>I've currently made this:</p>

<pre><code>&lt;?php

    header("Content-Type: image/png");

    $user = "";
    $alteration = $_GET[ 'alt' ];

    $altDir = "alts/";
    if($user == "") { $user = "Test"; } else { $user = $_GET['user']; }
    if( $alteration == "" ) { $alteration = "Test"; }

     if( $alteration == "1" ) {

        $canvas = imagecreatetruecolor (60, 95);
        $bg = imagecolorallocate ($canvas, 255, 255, 255);
        imagefill ($canvas, 0, 0, $bg);
        imagecolortransparent($canvas, $bg); 

        $loadImg = imagecreatefrompng("http://www.habbo.com/habbo-imaging/avatarimage?user=" . $user . "&amp;action=crr=0&amp;direction=36&amp;head_direction=35&amp;gesture=sml&amp;size=l" );
        $microphone = imagecreatefrompng($altDir . "1.png");

        imagecopy($canvas, $loadImg, 10, -17, 0, 0, 64, 110);
        imagecopy($canvas, $microphone, 5, 40, 0, 0, 18, 18);

    }
    elseif( $alteration == "2" ) {

        $canvas = imagecreatetruecolor (110, 110);
        $bg = imagecolorallocate ($canvas, 255, 255, 255);
        imagefill ($canvas, 0, 0, $bg);
        imagecolortransparent($canvas, $bg); 

        $loadImg = imagecreatefrompng("http://www.habbo.com/habbo-imaging/avatarimage?user=" . $user . "&amp;direction=35&amp;head_direction=35&amp;gesture=srp&amp;size=l" );
        $boxsign = imagecreatefrompng($altDir . "2.png");

        imagecopy($canvas, $loadImg, 10, -17, 0, 0, 64, 95);
        imagecopy($canvas, $boxsign, 8, 0, 0, 0, 68, 110);

    } else {

        $habboImg = "http://habbo.com/habbo-imaging/avatarimage?user=" . $user . "&amp;action=std&amp;direction=35&amp;head_direction=35&amp;gesture=sml&amp;size=l";
        $loadImg = imagecreatefrompng($habboImg);

    }

    imagepng($canvas);
    imagedestroy($canvas);

?&gt;
</code></pre>

<p>However, this doesn't give the results I need. As I've created a canvas, it saves when I attempt to save the image. Is there any other way of doing this without going to save the image and the canvas saving along with it?</p>

<p>Just realised how bad I am at explaining, I'm really sorry.</p>
