From 27e7e9451cc10b27c47db00fb7a9f278003ce9b8 Mon Sep 17 00:00:00 2001 From: Benny Siegert Date: Thu, 15 Mar 2012 09:44:37 +1100 Subject: [PATCH] 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 --- bmp/reader.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bmp/reader.go b/bmp/reader.go index 58bd781..4799d15 100644 --- a/bmp/reader.go +++ b/bmp/reader.go @@ -135,13 +135,13 @@ func DecodeConfig(r io.Reader) (config image.Config, err error) { // Every 4th byte is padding. 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: if offset != fileHeaderLen+infoHeaderLen { err = ErrUnsupported return } - return image.Config{color.RGBAModel, width, height}, nil + return image.Config{ColorModel: color.RGBAModel, Width: width, Height: height}, nil } err = ErrUnsupported return