bivoc/bulletproof — pull request #21 by petervanderdoes (2014-09-20 02:43:45+00:00)
Title: Allow resizing based on either width or height

Sometimes it's wanted to resize only based on width or height.
This pull request makes this possible, just use NULL for the size you don't care about.

$bulletProof
->fileTypes(array("jpg", "gif", "png", "jpeg"))
->uploadDir("shrinked_images")
->shrink(array("height"=>null, "width"=>200), true)
->upload($_FILES["pictures"]);

This only makes sense when you want to preserve the ratio of the image, so it doesn't work is you don't use the ratio setting.