Add support for colourspace (fix #45)

This commit is contained in:
Yoan Blanc 2015-07-10 15:56:21 +02:00
parent 5874efef3e
commit 8a2b991ce8
7 changed files with 41 additions and 3 deletions

View file

@ -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)