refactor(resize)

This commit is contained in:
Tomas Aparicio 2015-07-09 23:31:51 +01:00
parent 417616ef9c
commit a45e277f68

View file

@ -45,7 +45,7 @@ func Resize(buf []byte, o Options) ([]byte, error) {
// Do not enlarge the output if the input width or height
// are already less than the required dimensions
if o.Enlarge == false {
if inWidth < o.Width || inHeight < o.Height {
if inWidth < o.Width && inHeight < o.Height {
factor = 1.0
shrink = 1
residual = 0