bmp: support to decode 8-bit format with up to 256 color palette
If colorUsed is 0, the number of palette is 2 to the power of bit per pixel.
testdata/colormap-251.{bmp,png} are added for testing 8-bit format with colorUsed less than 256.
testdata/colormap-0.{bmp,png} are added for testing 8-bit format with colorUsed 0.
Fixes golang/go#61240
Change-Id: I1a627a570f667874a91c517f4a771e9e97d2af6b
Reviewed-on: https://go-review.googlesource.com/c/image/+/508575
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Reviewed-by: Nigel Tao (INACTIVE; USE @golang.org INSTEAD) <nigeltao@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Run-TryBot: Nigel Tao <nigeltao@golang.org>
This repository holds supplementary Go image libraries.
The easiest way to install is to run go get -u golang.org/x/image/.... You can also manually git clone the repository to $GOPATH/src/golang.org/x/image.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://golang.org/doc/contribute.html.
The main issue tracker for the image repository is located at https://github.com/golang/go/issues. Prefix your issue with “x/image:” in the subject line, so it is easy to find.