Replacing SmartCrop with a Gravity option

This commit is contained in:
Mark van der Velden 2017-05-24 14:20:54 +02:00
parent d232b4098a
commit 855de7ca55
3 changed files with 7 additions and 6 deletions

View file

@ -44,10 +44,10 @@ func (i *Image) ResizeAndCrop(width, height int) ([]byte, error) {
// SmartCrop produces a thumbnail aiming at focus on the interesting part.
func (i *Image) SmartCrop(width, height int) ([]byte, error) {
options := Options{
Width: width,
Height: height,
Crop: true,
SmartCrop: true,
Width: width,
Height: height,
Crop: true,
Gravity: GravitySmart,
}
return i.Process(options)
}