CodeSleeve/stapler — pull request #35 by DinkDonk (2014-02-14 01:49:53+00:00)
Title: Fixed two bugs.

**Bug 1:**
When uploading file that is not an image, Attachment.php threw a "File not found" error when the attachment had styles defined. This is because it tried to process and version the file even though it was not an image.

**Solution to bug 1:**
Added an isImage() test before queueAllForWrite() is called.

**Bug 2:**
resizeAuto() in Resizer.php did not adhere to the original image's aspect ratio.

**Solution to bug 2:**
Added aspect ratio check on the original size of the image instead of checking the aspect ratio of the resize size. This produces the wanted result, also know as scale-to-fit.