diff --git a/resize.go b/resize.go index 5769a0e..6e14960 100644 --- a/resize.go +++ b/resize.go @@ -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