mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-07 21:48:13 -08:00
refactor(resize): use not equal operator (again)
This commit is contained in:
parent
3c158381b0
commit
e6b50ded02
1 changed files with 1 additions and 1 deletions
|
|
@ -242,7 +242,7 @@ func extractOrEmbedImage(image *C.VipsImage, o Options) (*C.VipsImage, error) {
|
|||
left, top := (o.Width-inWidth)/2, (o.Height-inHeight)/2
|
||||
image, err = vipsEmbed(image, left, top, o.Width, o.Height, o.Extend, o.Background)
|
||||
break
|
||||
case o.Top > 0 || o.Left > 0 || o.AreaWidth > 0 || o.AreaHeight > 0:
|
||||
case o.Top != 0 || o.Left != 0 || o.AreaWidth != 0 || o.AreaHeight != 0:
|
||||
if o.AreaWidth == 0 {
|
||||
o.AreaHeight = o.Width
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue