PNG manipulation removes transparency
<p>I am simply trying to return an PNG image through PHP, but I have a problem with the transparency not showing right. (Basically one PHP file will be capable of returning any of my images.)</p>

<p>I use simple code to return the image:</p>

<pre><code>&lt;?php
    $im = imagecreatefrompng("images/fakehairsalon.png");
    header('Content-Type: image/png');
    imagepng($im);
    imagedestroy($im);
?&gt;
</code></pre>

<p>The original image looks like this:
<img src="http://i.stack.imgur.com/pUgut.png" alt="Original image"></p>

<p>And the one returned via PHP (and that piece of code) looks like this:
<img src="http://i.stack.imgur.com/41wkS.png" alt="Messed up image"></p>

<p>Is there anything I can do to prevent this and make the image come through normal?</p>
