mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02: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:
@@ -48,6 +48,10 @@ type ImageResourceOps interface {
|
||||
// Exif returns an ExifInfo object containing Image metadata.
|
||||
Exif() *exif.ExifInfo
|
||||
|
||||
// Colors returns a slice of the most dominant colors in an image
|
||||
// using a simple histogram method.
|
||||
Colors() ([]string, error)
|
||||
|
||||
// Internal
|
||||
DecodeImage() (image.Image, error)
|
||||
}
|
||||
|
Reference in New Issue
Block a user