Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/image/bmp: Support writing the alpha channel when present #25945

Closed
kodawah opened this issue Jun 18, 2018 · 5 comments
Closed

x/image/bmp: Support writing the alpha channel when present #25945

kodawah opened this issue Jun 18, 2018 · 5 comments

Comments

@kodawah
Copy link

kodawah commented Jun 18, 2018

Version/Arch

go version go1.10.3 darwin/amd64
issue reproducible with the latest release (on any arch)

GOHOSTARCH="amd64"
GOHOSTOS="darwin"

Description

  • Encode a image buffer containing an alpha channel using the bmp encoder
  • The alpha channel is ignored and an opaque image is produced
  • Alpha in BMP seems to be supported in version 4, since Windows 95, according to this spec http://www.fileformat.info/format/bmp/egff.htm

What did you expect to see?

  • I wanted the alpha channel to be preserved, at least when it is present
  • Maybe it would be possible to call the Opaque() method to see if the image actually contains alpha data to be preserved

What did you see instead?

@gopherbot gopherbot added this to the Unreleased milestone Jun 18, 2018
@agnivade
Copy link
Contributor

/cc @nigeltao

@nigeltao
Copy link
Contributor

Yeah, it's probably a legitimate feature request, but I don't think I'll have any spare time to look at this soon. Sorry.

@gopherbot
Copy link

Change https://golang.org/cl/120095 mentions this issue: bmp: Add support for writing bitmaps with alpha channels

gopherbot pushed a commit to golang/image that referenced this issue Jul 6, 2018
This also fixes the writer test to actually compare the decoded images,
so as to make sure it is decoded properly.

Implements golang/go#25945.

Change-Id: I606887baa11b7664018313cf7d5800b2dc7622cf
Reviewed-on: https://go-review.googlesource.com/120095
Reviewed-by: Nigel Tao <nigeltao@golang.org>
Run-TryBot: Nigel Tao <nigeltao@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
@dwbuiten
Copy link
Contributor

dwbuiten commented Jul 6, 2018

This can be closed now, I think.

@jimmyfrasche
Copy link
Member

It appears so. Thank you @dwbuiten

@golang golang locked and limited conversation to collaborators Jul 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants