-
Notifications
You must be signed in to change notification settings - Fork 18k
x/exp/shiny/iconvg: crash when rasterizing icons with translucent palette #39526
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
Original bug report: https://todo.sr.ht/~eliasnaur/gio/132. |
This seems to be crashing because The color is invalid, however crashing is not probably the best way to handle it. I guess the options are:
|
It panics, exactly because of what @egonelbre is saying and that in this code that leaves the |
Just to clarify, the color was actually a valid premultiplied color, but a different kind. There are three variants in the wild:
http://ssp.impulsetrain.com/gamma-premult.html
|
Change https://golang.org/cl/291150 mentions this issue: |
I'm going to go with "skip drawing it altogether". We already re-purpose some of the "invalid alpha-premultiplied color space" to encode gradients, so I'm not sure if we can always fix it. Sorry for the late reply. |
Fixes golang/go#39526 Change-Id: I4ab207b24e424e92b2d8af86a64294db94631aa7 Reviewed-on: https://go-review.googlesource.com/c/exp/+/291150 Trust: Nigel Tao <nigeltao@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes (as of golang/exp@0022984)
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Applied
and ran
go test
What did you expect to see?
An error because of the missing testdata reference image.
What did you see instead?
CC @nigeltao
The text was updated successfully, but these errors were encountered: