How do I resize an existing image (not create a new copy
<p>Everything I can find online about re-sizing an existing image with PHP seems to be about taking an existing image and creating a resized thumbnail (unless I'm missing something).  I already have the existing image on the server and i want THAT image (not a copy of that image) to be re sized.  I want the quality to be decent so I'm thinking: imagecopyresized
<a href="http://php.net/manual/en/function.imagecopyresized.php" rel="nofollow">http://php.net/manual/en/function.imagecopyresized.php</a></p>

<p>This is what I tried:</p>

<pre><code>imagecopyresampled($sourceImageFilePath, $sourceImageFilePath, 0, 0, 0, 0, $resizedWidth, $resizedHeight, $origWidth, $origHeight);
</code></pre>

<p>but I get a supplied argument is not a valid Image resource error.</p>

<p>I know if I was creating a new resized image from the existing I would need this:</p>

<pre><code>$thumb = imagecreatetruecolor($resizedWidth, $resizedHeight);
</code></pre>

<p>But I dont want to create NEW image but resize an existing one.</p>

<p>Thoughts?</p>
