-
How to resize an image to fit in a desired space.
With this script you can upload images
gif,jpg,bmp.
In the submit form you can provide
the max height and max width needed.
After submitting the uploaded image
file will be resized to the new
max height and max width provided.
On the http://www.get-on-top.com/image_resize/resize.php
you can find the Example form
you can also find the php code for the script.
-
-
This may help, as may other examples on the page:
http://www.php.net/manual/en/functio...ized.php#61962
The question is how you want to deal with the width/height: Is the height the max? The width? Whichever is smaller? Larger? Doing some simple tests of $w>$h, etc will determine that, then you just need to decide what to do. Usually, it makes sense to find which is larger, then make the image that dimension at 100px (or whatever limit you choose), and have the other scaled smaller, relatively.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks