Printer Friendly Version
Email this thread to a friend
|
what is best php or html? (In: General Search Engine Optimization)
Featured Web Site Template |
|
There are 0 guests and 1 members in the forums right now.
Reflects user activity within the last 5 minutes
|
|
| Member |
Message |
darrens
Joined: May 27, 2004
# Posts: 182
|
Posted: 2006-Jun-05 03:25
Hi,
Im lloking at a new project where users of the site will have the ability to upload various images.
This part is no problem but im worried that non-techie people will upload images from there digital cameras that are high res (300dpi)
Does anyone know if there is a php function that i could maybe run every evening as a cron that would check the dpi of a image and downsize it to 72dpi if required?
Thanks in advance.
|
 |
dirty_shame
Joined: Aug 28, 2005
# Posts: 191
|
Posted: 2006-Jun-05 22:29
We use a PHP class that automatically resizes images as they are transferred from the temp upload dir to the permanent dir...Then deletes the temp files. It also changes any file names that contains blanks (spaces) and the GD lbrary rebuilds them into .jpgs or .pngs. You can resize by pixel specs or percentage.
Easier to handle it during the upload than running a cron since your server could be already choked before the cron has a chance to modify the pics.
|
 |
bhartzer
Staff
Joined: Jun 08, 2000
# Posts: 7042
|
Posted: 2006-Jun-05 22:49
You could also set it so that it checks the file size before they upload it; just tell them that the file is too big and make them resize it or submit a smaller file.
|
 |
darrens
Joined: May 27, 2004
# Posts: 182
|
Posted: 2006-Jun-05 22:55
Im not worried about the resizing but i need to make sure that the images are 72dpi and not 300dpi !
The clients using the size will be non-techie and i bet they would have NO idea how to resize a image.
|
 |
dirty_shame
Joined: Aug 28, 2005
# Posts: 191
|
Posted: 2006-Jun-26 07:21
Okay. Set the max image resolution using the GD2 library when it's being processed/rebuilt from the temp dir to the permanent dir. Not worried about resizing? Good luck displaying those 2400 pixel-width uploads.
|
 |
You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
- You have not yet logged in, or registered properly as a member
- You are a member, but no longer have posting rights.
- This is a private forum, for which you do not have permissions.
If you are a recent member, it's possible that you simply have not yet confirmed your account. Please
check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions
contained within.
If you cannot find this message, click here to Re-Send it.
|
If you are still experiencing problem, please read the
Login Assistance
Article for some advice on what may be causing your login not to work properly.
|
Switch to Advanced Editor and ...
Create a New Topic
or Reply to this Thread
|
|