Search code examples
phpjqueryimage-processingphp-gd

PHP: Image Croper / Resizer


I'm working on a website that has many tiled images using JQuery's Masonry plugin. The tiles are all uniform in size, but the images contained within them can be a number of sizes.

I was wondering if there's a good recommendation for a PHP plugin / script that can take an incoming image of any size, and do whatever is required to fit in a certain sized box (have automatically resize, crop, insert black space, etc.)

EDIT:

Thanks for the Php options. is there anything in the JQuery realm too?


Solution

  • This script would fit your need as well :

    http://www.phpcodester.com/2011/01/php-function-to-resize-image-to-fit-in-a-standard-box-without-distortion/

    If you need to modify something, php's image functions are always named imagesomething($resource,x,y,etc.)

    Hope this helps.