Skip to content

Instantly share code, notes, and snippets.

@a3020
Created August 5, 2013 07:37
Show Gist options
  • Save a3020/6154084 to your computer and use it in GitHub Desktop.
Save a3020/6154084 to your computer and use it in GitHub Desktop.
$im->getThumbnail()
$r = $im->getThumbnail($obj, $width, $height, $crop = false)
Returns a path to the specified item, resized to meet max width and height. $obj can either be a string (path) or a file object. Returns a PHP object with the following properties set
src - the relative path to the image (useful for display in browsers)
width - the new width of the image
height - the new height of the image
crop - crop image if dimensions exceed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment