mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-08 23:18:19 -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
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue