gpui: Fix BGRA conversion for SVG rendering#52641
gpui: Fix BGRA conversion for SVG rendering#52641MrSubidubi merged 2 commits intozed-industries:mainfrom
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @nakashima-hikaru on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
We require contributors to sign our Contributor License Agreement, and we don't have @nakashima-hikaru on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
The cla-bot has been summoned, and re-checked this pull request! |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
MrSubidubi
left a comment
There was a problem hiding this comment.
Nice find and very much appreciate the test you added for this!
I went ahead and removed the parameter altogether, given that it is now true throughout the codebase and I think that other consumers would probably expect the image to always be in the proper color space.
In any case, thank you for this and congratulations to your first contribution! 🎉
|
Thanks a lot for the review and for cleaning that up. |
Description
Fixes swapped red/blue channels when rendering SVG images.
Describe the bug
When rendering a full-color SVG into an Image object using Image::from_bytes(ImageFormat::Svg, ...) on macOS, the resulting bitmap has its Red and Blue channels swapped. For example, a color specified as #38BDF8 (Light Blue) in the SVG source appears as yellowish in the rendered GPUI view.
Steps to reproduce
Expected behavior
The rectangle should be rendered in Light Blue (#38BDF8).
Actual behavior
The rectangle is rendered in Yellowish Color (#F8BD38).
Self-Review Checklist:
Closes #ISSUE
Release Notes: