Printer Friendly Version Print this thread
Email this thread to a friend eMail this thread to a friend
  • what is best php or html? (In: General Search Engine Optimization)
  • Featured Web Site Template

    Hundreds More at Free Site Templates.com!

    Web Site Partners
    Sponsored Links
    Jet City Software
     
    Whos Here ?
    There are 0 guests and 1 members in the forums right now.
    Reflects user activity within the last 5 minutes
    Moderator(s): Prowler, jcokos
    Member Message

    darrens
    Joined: May 27, 2004
    # Posts: 182

    View the profile for darrens Send darrens a private message

    Posted: 2006-Jun-05 03:25
    Edit Message Delete Message Reply to this message

    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

    View the profile for dirty_shame Send dirty_shame a private message

    Posted: 2006-Jun-05 22:29
    Edit Message Delete Message Reply to this message

    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

    View the profile for bhartzer Send bhartzer a private message

    Posted: 2006-Jun-05 22:49
    Edit Message Delete Message Reply to this message

    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

    View the profile for darrens Send darrens a private message

    Posted: 2006-Jun-05 22:55
    Edit Message Delete Message Reply to this message

    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

    View the profile for dirty_shame Send dirty_shame a private message

    Posted: 2006-Jun-26 07:21
    Edit Message Delete Message Reply to this message

    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:
    1. You have not yet logged in, or registered properly as a member
    2. You are a member, but no longer have posting rights.
    3. 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

    New posts Forum is locked
    © 1995  ·  iWeb, Inc  ·  DBA JimWorld Productions