PHP -> Register -> Avatar Upload help. +rep for everyone.

Discussion in 'PHP' started by Josh-H, Jul 9, 2007.

  1. #1
    What could I implement into my php script so that when a user registers

    It uploads their desired image
    Makes it into a square 150x150 image but keeps its proportions. Basically cutting off the excess image.

    I'm guessing this is PHP GD?

    Thank You. +rep to all help.
     
    Josh-H, Jul 9, 2007 IP
  2. killerj

    killerj Active Member

    Messages:
    765
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    95
    #2
    killerj, Jul 9, 2007 IP
  3. ansi

    ansi Well-Known Member

    Messages:
    1,483
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    100
    #3
    other than that (which is the best approach imho) you could also use getimagesize() and make sure that it a certain h/w. or even check to make sure that it isn't over 80x80 and then scale it down to 50x50 or your desired size to help prevent quality loss within the avatar itself.
     
    ansi, Jul 9, 2007 IP