mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-07 21:48:13 -08:00
Merge pull request #156 from Dynom/SmartCropToGravity
Replacing SmartCrop with a Gravity option
This commit is contained in:
commit
93ce8ef143
5 changed files with 69 additions and 18 deletions
|
|
@ -249,7 +249,7 @@ func extractOrEmbedImage(image *C.VipsImage, o Options) (*C.VipsImage, error) {
|
|||
inHeight := int(image.Ysize)
|
||||
|
||||
switch {
|
||||
case o.SmartCrop:
|
||||
case o.Gravity == GravitySmart, o.SmartCrop:
|
||||
image, err = vipsSmartCrop(image, o.Width, o.Height)
|
||||
break
|
||||
case o.Crop:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue