Okay, the reason I posted this is because I wasn\'t sure what to search for. I\'ll try to explain it as clearly as I can.
Say, I have an image sized 800x600. The box
It is very easy to use here is the class https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/timthumb/timthumb.php here are the params http://viralpatel.net/blogs/resize-image-dynamically-php/ I have tested looks works great
example is < img src="/script/timthumb.php?src=/some/path/myimage.png&w=100&h=80" alt="resized image" />
Remember that you should be careful to use this, If you do not create regex validation for input params you may have security vulnerability. That's why they deprecated this lib, but it works perfect.