Once again, here I am with a simple issue that I cannot solve because the search terms I use apparently don’t match the ones that have been used before. What I want to create is just a tiny piece of script making it possible to change the image width using the URL.
An example can be found on http://waarneming.nl/fotonew/0/2639780.jpg. If you add the variables ?w=100&h=100, the image is resized. Important to mention is that I need no cropping (which doesn’t happen in the example too, even though 100×100 is of course not the right ratio). The only thing to happen is what can be done with CSS and HTML too: change height and width of a larger picture. But because I need the resized image in another script, I want to use URL variables.
Hope you can help!
Use the SimpleImage library:
Then, try this:
In order to call the script, you would pass the filename, width and height through your URL. Assuming the script is named foo.php:
http://www.example.com/foo.php?file=picture_name.jpg&width=100&height=100