Results 1 to 3 of 3

Thread: Use PHP to crop an image from another website on the same server

Hybrid View

  1. #1
    Join Date
    Apr 2011
    Seattle, WA

    Exclamation Use PHP to crop an image from another website on the same server

    I need to resize and crop some images that I'm sticking into FPDF... I need them to be resized and cropped to fit a 150 x 188 pixel rectangle... but I'd prefer to have a reusable function that I can pass the filename (full URL) and the target-dimensions to... then I can have it do the math with the dimensions to find out how big the resized image should be... I just need it to actually make a copy that size and then crop it to the other dimensions (evenly cropped, please, so it's still centered)

    Any help is greatly appreciated. I've seen tons of ideas around the internet that just don't work and it's hard to sift through and find one that actually does.

    And it needs to work with a full URL because most of the images are on a different website, but they're all hosted on the same server & account.

    Thanks in advance!

  2. #2
    Join Date
    Aug 2004
    Here's something I came up with a couple years ago: http://www.charles-reace.com/blog/?s=image+resize+crop
    "Well done....Consciousness to sarcasm in five seconds!" ~ Terry Pratchett, Night Watch

    How to Ask Questions the Smart Way (not affiliated with this site, but well worth reading)

    My Blog
    cwrBlog: simple, no-database PHP blogging framework

  3. #3
    Join Date
    Oct 2010
    And in case you're looking for something supporting more then jpeg here's mine --> http://rdennispallas.com/coding/view/2-ImageResize
    www.rdennispallas.com <-- Personal Site, changing regularly cuz its ugly.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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