forked from nfnt/resize
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't resize inputs with zero width or height
Inputs having zero as both width and height were caught, but either one alone caused a panic. This adds a test showing the old failing behavior and adds a check for non-positive width/height. Since Resize doesn't have an error return value, the behavior in this case is to return the original image. Fixes nfnt#52
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters