mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
Allow images to be cropped without being resized
Introduces the Crop method for image processing which implements gift.CropToSize. Also allows a smartCrop without resizing, and updates the documentation. Fixes #9499
This commit is contained in:
parent
aebde49b88
commit
7732da9f93
9 changed files with 75 additions and 8 deletions
|
@ -100,6 +100,10 @@ func (e *errorResource) Width() int {
|
|||
panic(e.error)
|
||||
}
|
||||
|
||||
func (e *errorResource) Crop(spec string) (resource.Image, error) {
|
||||
panic(e.error)
|
||||
}
|
||||
|
||||
func (e *errorResource) Fill(spec string) (resource.Image, error) {
|
||||
panic(e.error)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue