FIX: Image resizing breaks when one of the resized image dimensions is between 0 and 1.
Solution: Round up to 1 instead of down to 0.
Converted php errors to exceptions in the process.
Merge pull request #3591 from jedateach/issues/image-resize-fix

FIX: Image resizing breaks when one of the resized image dimensions is between 0 and 1