mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-10 07:50:26 -07:00
Add support for colourspace (fix #45)
This commit is contained in:
parent
5874efef3e
commit
8a2b991ce8
7 changed files with 41 additions and 3 deletions
6
image.go
6
image.go
|
|
@ -134,6 +134,12 @@ func (i *Image) Convert(t ImageType) ([]byte, error) {
|
|||
return i.Process(options)
|
||||
}
|
||||
|
||||
// Colour space conversion
|
||||
func (i *Image) Colourspace(c Interpretation) ([]byte, error) {
|
||||
options := Options{Interpretation: c}
|
||||
return i.Process(options)
|
||||
}
|
||||
|
||||
// Transform the image by custom options
|
||||
func (i *Image) Process(o Options) ([]byte, error) {
|
||||
image, err := Resize(i.buffer, o)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue