bmp: ignore alpha in Decode when the alpha channel is not supported

When the alpha channel is not supported, the alpha component in the
original image should be ignored in the decoded image data (that is,
set to 0xFF in the decoded data).

testdata/yellow_rose-small.png has been modified to pass the test.
No new test is added because testdata/yellow_rose-small.bmp has
covered this case.

Fixes golang/go#54368.

Change-Id: Ib46947ec0448340e4313773f3c8534f4dc26bc36
GitHub-Last-Rev: 1eeb39647c0873ae47aab1e3934394e5180de59a
GitHub-Pull-Request: golang/image#10
Reviewed-on: https://go-review.googlesource.com/c/image/+/425418
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
2 files changed
tree: 5cf3d476c344ce564d2f0ab73c40a7757687e0cd
  1. bmp/
  2. ccitt/
  3. cmd/
  4. colornames/
  5. draw/
  6. example/
  7. font/
  8. math/
  9. riff/
  10. testdata/
  11. tiff/
  12. vector/
  13. vp8/
  14. vp8l/
  15. webp/
  16. .gitattributes
  17. .gitignore
  18. codereview.cfg
  19. CONTRIBUTING.md
  20. go.mod
  21. go.sum
  22. LICENSE
  23. PATENTS
  24. README.md
README.md

Go Images

Go Reference

This repository holds supplementary Go image libraries.

Download/Install

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.

Report Issues / Send Patches

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.