place transparent image over non-transparent image
<p>I crop an uploaded image ($image) to a fixed size.</p>

<pre><code>$new = imagecreatetruecolor($width, $height);
imagealphablending($new, false);
imagesavealpha($new, true);
imagecopyresampled($new, $image, 0, 0, $x, $y, $width, $height, $width, $height);
</code></pre>

<p>I read that imagealphablending and imagesavealpha should be set like that. $image is not transparent.</p>

<pre><code>$cover = imagecreatefrompng('../img/magazine2.png');
imagealphablending($cover, false);
imagesavealpha($cover, true);
</code></pre>

<p>Is the image that should be placed on top, and I read that it should have those settings.
both $new and $cover are now the exact same size.</p>

<p>And then I copy $cover over $new, which should be shown because $cover is transparent</p>

<pre><code>imagecopy($new, $cover, 0, 0, 0, 0, $width, $height);
</code></pre>

<p>But it's placed on $new without transparency, what is missing?</p>
