mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
resources/images: Add $image.Colors
Which returns the most dominant colors of an image using a simple histogram method. Fixes #10307
This commit is contained in:
parent
08f0984f91
commit
a4028112e3
10 changed files with 90 additions and 0 deletions
|
@ -123,6 +123,10 @@ func (e *errorResource) Exif() *exif.ExifInfo {
|
|||
panic(e.ResourceError)
|
||||
}
|
||||
|
||||
func (e *errorResource) Colors() ([]string, error) {
|
||||
panic(e.ResourceError)
|
||||
}
|
||||
|
||||
func (e *errorResource) DecodeImage() (image.Image, error) {
|
||||
panic(e.ResourceError)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue