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

@ -122,6 +122,7 @@ func Resize(buf []byte, o Options) ([]byte, error) {
Compression: o.Compression,
Interlace: o.Interlace,
NoProfile: o.NoProfile,
Interpretation: o.Interpretation,
}
// Finally save as buffer
@ -143,6 +144,9 @@ func applyDefaults(o *Options, imageType ImageType) {
if o.Type == 0 {
o.Type = imageType
}
if o.Interpretation == 0 {
o.Interpretation = sRGB
}
}
func normalizeOperation(o *Options, inWidth, inHeight int) {