go.image/bmp: fix warnings from go vet
reader.go:138:10: image.Config struct literal uses untagged fields reader.go:144:10: image.Config struct literal uses untagged fields R=nigeltao CC=golang-dev https://golang.org/cl/5825047
This commit is contained in:
parent
20e9620e99
commit
27e7e9451c
|
@ -135,13 +135,13 @@ func DecodeConfig(r io.Reader) (config image.Config, err error) {
|
||||||
// Every 4th byte is padding.
|
// Every 4th byte is padding.
|
||||||
pcm[i] = color.RGBA{b[4*i+2], b[4*i+1], b[4*i+0], 0xFF}
|
pcm[i] = color.RGBA{b[4*i+2], b[4*i+1], b[4*i+0], 0xFF}
|
||||||
}
|
}
|
||||||
return image.Config{pcm, width, height}, nil
|
return image.Config{ColorModel: pcm, Width: width, Height: height}, nil
|
||||||
case 24:
|
case 24:
|
||||||
if offset != fileHeaderLen+infoHeaderLen {
|
if offset != fileHeaderLen+infoHeaderLen {
|
||||||
err = ErrUnsupported
|
err = ErrUnsupported
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return image.Config{color.RGBAModel, width, height}, nil
|
return image.Config{ColorModel: color.RGBAModel, Width: width, Height: height}, nil
|
||||||
}
|
}
|
||||||
err = ErrUnsupported
|
err = ErrUnsupported
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue
Block a user