SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Evangelist Pixelateur's Avatar
    Join Date
    Feb 2006
    Location
    Hamburg, Germany
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Cropping images before upload

    Hi,

    I want my users to be able to crop and upload images to my database and I'm looking for an easy way to do this. I looked into ImageMagick and RMagick, but installing the former seems like such an agony of pain, especially for a command line newbie like me. Is there an easier way to achieve the same functionality that ImageMagick offers?

    Thanks for any input...

  2. #2
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you mean resizing (shrinking the image some percentage) or really cropping (re-centering, etc)?
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  3. #3
    SitePoint Evangelist Pixelateur's Avatar
    Join Date
    Feb 2006
    Location
    Hamburg, Germany
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Both actually. I guess the second one would be a awful lot harder to do than the first one though, right? So, I guess I should focus on the first one (shrinking the image some percentages).

  4. #4
    SitePoint Addict nueva's Avatar
    Join Date
    Apr 2006
    Location
    Uk, London
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    where you dont understand?

  5. #5
    SitePoint Wizard samsm's Avatar
    Join Date
    Nov 2001
    Location
    Atlanta, GA, USA
    Posts
    5,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I asked because if you need for lay users to crop as well as scale, I'd suggest ditching any hopes of a command line application working and go directly for free, low download size, user friendly image editors.

    Maybe iPhoto for Mac, GIMP for Linux, and beats me for Windows (photo.net?).

    Rmagic isn't that difficult to use from a programming perspective, but getting it installed on a client's machine ... geeze, just find an existing editor unless your needs are more specific.
    Using your unpaid time to add free content to SitePoint Pty Ltd's portfolio?

  6. #6
    SitePoint Enthusiast Insane_Edna's Avatar
    Join Date
    Oct 2003
    Location
    Alberta, Canada
    Posts
    37
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    acts_as_attachment will allow you to crop images as you upload them. You can find the tutorial here: http://toolmantim.com/article/2006/9..._as_attachment
    This doesn't give you control of where to crop will just crop the image. Hope this helps.


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
  •