Resizing A Image For Upload
Moderator: General Moderators
Resizing A Image For Upload
I was wondering if it is possible to resize a image that has been sent from a form, and then upload it after it has been resized?
Right now my script just accepts the image file from a FILE input and uploads it. I want to resize the photo submitted first and THEN upload it.
Is this possible, if so how?
Right now my script just accepts the image file from a FILE input and uploads it. I want to resize the photo submitted first and THEN upload it.
Is this possible, if so how?
- nickman013
- Forum Regular
- Posts: 764
- Joined: Sun Aug 14, 2005 12:02 am
- Location: Long Island, New York
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Put it this way, unless you want to go through alot of trouble, you can't do it. It's not possible with PHP alone, it's a server side language. It can't handle any sort of file until it's on the server.
It would be a heck of a lot easier for you to just offer the user(s) a simple free image editting program and tell them to resize images before uploading to save time if they wish, any remotely experienced users would realise that uploading a larger file will take longer than a smaller file anyway.
If you are the only user, then as jspro2 said, Photoshops batch actions are a good idea for performing the same task on multiple files at once, such as resizing a bunch of images to the same dimensions.
If you don't care that your idea is more hassle than it's worth, as jshpro2 said (again) look into some sort of Java/Active X application to embed into your webpage, which will do the resezing client side.
It would be a heck of a lot easier for you to just offer the user(s) a simple free image editting program and tell them to resize images before uploading to save time if they wish, any remotely experienced users would realise that uploading a larger file will take longer than a smaller file anyway.
If you are the only user, then as jspro2 said, Photoshops batch actions are a good idea for performing the same task on multiple files at once, such as resizing a bunch of images to the same dimensions.
If you don't care that your idea is more hassle than it's worth, as jshpro2 said (again) look into some sort of Java/Active X application to embed into your webpage, which will do the resezing client side.