Generate Thumbnails
<p>I have a php script which uploads multiple files.</p>

<p>What I'm Looking for is a script which generates thumbnails and keeps the ratio, so if the original is 1000 x 500 and I set width to 200 the img will be 200 x 100.</p>

<p>I have a variable <code>$file_name</code> which contains the file name. </p>

<p>The image can be jpg, png, JPEG, gif, and more types. The output file isn't important (as long as it is an image). The image can be up to 4.5 MB. I want it to give a width of 300px and height must be ratio.</p>

<p>Is there a easy way to create a script?</p>

<p>I have found <a href="http://nl3.php.net/imagejpeg" rel="nofollow">http://nl3.php.net/imagejpeg</a> which looks simple. But what is the easiest option. I <strong>don't need a framework</strong> which I can reuse, I need the simplest script. So the <strong>smallest possible</strong>.</p>
