-
Notifications
You must be signed in to change notification settings - Fork 18k
x/image: bmp decode of attached image will result in all alpha values to be 0 #54368
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
Comments
I am getting a 404 on the link cited (https://file.io/3QG9p08hAz71) |
@thanm Oh, sorry about that. That provider seems to delete the file after first download. Since I can't upload BMP files here directly, any idea what to use for a hosting service? |
zip the file and upload here |
lol, yes. how could I not think about zipping it -.- thanks |
Here is the information of the image:
We are interested in these attributes:
For I think this is a bug in the It's interesting that the My fix will make this test fail. Obviously, the two images look different and in my opinion, the failure is expected. I will modify BTW, GraphicsMagick 1.3.38 has the same issue. Running the following command will generate a transparent image:
References: |
Change https://go.dev/cl/425418 mentions this issue: |
@ZekeLu thanks for sending that CL, looks good to me (although I have very little familiarity with image/bmp). |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
download this BMP image
execute this bmp-to-png conversion "script":
What did you expect to see?
I expect to see the original image in png format or an error while opening the bmp file if its corrupt.
What did you see instead?
I saw no errors and the resulting png image is completely transparent. All alpha values of
bmp_decode
are 0.The text was updated successfully, but these errors were encountered: