SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Jun 2007
    Posts
    396
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Facebook-esque profile image resize?

    Hi,

    I'm currently working on a website where users can upload a photo to use as a profile pic, the problem is, I have absolutely no idea how to get it to a consistent size to display on various pages and searches (i.e. a thumbnail, as well as a fixed size picture on their profile)

    For example, for the thumbnail that'll be shown on listing pages etc, I'd like it to be 100% a set size, and maybe have the little tool like in Facebook where the user can select the area of the photo they'd like in the thumbnail?

    And then for the picture on their profile, just re-size it accordingly so it doesn't break the design (i.e. max height of 250px, max width of 300px) or similar.

    I really don't know where to begin, tempted by ImageMagik for PHP, but it's a bit overwhelming. Any suggestions would be fantastic, thank you

  2. #2
    SitePoint Wizard
    Join Date
    Oct 2005
    Location
    London
    Posts
    1,678
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'd need to get javascript on the go for the facebook re-sizer.....i've seen one built that uses prototype/scriptaculous...it's here:

    http://www.defusion.org.uk/code/java...scriptaculous/

    For the image cropping...yes you'll need something like imageMagik but I use GD library, which is very easy to get working....plenty of tut's around.so try that

    That should get you started....post back and let me know how you get on!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •