From 9b1e201e7c4c9d6c9292ff73c2c1131e5aa5e5ac Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Wed, 24 Oct 2018 10:00:46 +1100 Subject: [PATCH] bmp: update comment about decoding 32 bpp images Change-Id: I90f6d36d5257c31dc2e41943e5a1eaa7755da6d2 Reviewed-on: https://go-review.googlesource.com/c/144317 Reviewed-by: David Symonds Run-TryBot: David Symonds TryBot-Result: Gobot Gobot --- bmp/reader.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bmp/reader.go b/bmp/reader.go index 32bbda9..c10a022 100644 --- a/bmp/reader.go +++ b/bmp/reader.go @@ -165,7 +165,8 @@ func decodeConfig(r io.Reader) (config image.Config, bitsPerPixel int, topDown b if width < 0 || height < 0 { return image.Config{}, 0, false, ErrUnsupported } - // We only support 1 plane, 8 or 24 bits per pixel and no compression. + // We only support 1 plane and 8, 24 or 32 bits per pixel and no + // compression. planes, bpp, compression := readUint16(b[26:28]), readUint16(b[28:30]), readUint32(b[30:34]) // if compression is set to BITFIELDS, but the bitmask is set to the default bitmask // that would be used if compression was set to 0, we can continue as if compression was 0