mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-17 19:26:35 -07:00
refactor(resize)
This commit is contained in:
parent
417616ef9c
commit
a45e277f68
1 changed files with 1 additions and 1 deletions
|
|
@ -45,7 +45,7 @@ func Resize(buf []byte, o Options) ([]byte, error) {
|
||||||
// Do not enlarge the output if the input width or height
|
// Do not enlarge the output if the input width or height
|
||||||
// are already less than the required dimensions
|
// are already less than the required dimensions
|
||||||
if o.Enlarge == false {
|
if o.Enlarge == false {
|
||||||
if inWidth < o.Width || inHeight < o.Height {
|
if inWidth < o.Width && inHeight < o.Height {
|
||||||
factor = 1.0
|
factor = 1.0
|
||||||
shrink = 1
|
shrink = 1
|
||||||
residual = 0
|
residual = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue