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

Change uses of BGRA for images to RGBA and use image-rs 0.24 #1489

Closed
wants to merge 1 commit into from

Conversation

ids1024
Copy link
Contributor

@ids1024 ids1024 commented Oct 26, 2022

Is there a reason this was using BGRA? RGBA is more common, though BGR was historically popular at one point. image 0.24 has removed support for BGR images.

image::Handle::from_pixels() is renamed to image::Handle::from_rgba() to be more descriptive, and force any users to use RGBA instead of silently interpreting their pixels incorrectly.

Is there a reason this was using BGRA? RGBA is more common, though BGR
was historically popular at one point. `image` 0.24 has removed support
for BGR images.

`image::Handle::from_pixels()` is renamed to `image::Handle::from_rgba()`
to be more descriptive, and force any users to use RGBA instead of
silently interpreting their pixels incorrectly.
@ids1024 ids1024 force-pushed the rgba branch 2 times, most recently from 87cb37d to ce0a242 Compare November 3, 2022 16:16
@ids1024
Copy link
Contributor Author

ids1024 commented Nov 3, 2022

Updated to fix svg rendering (by removing the RGBA -> BGRA conversion, so this is an improvement).

Apparently wgpu only guarantees Bgra8Unorm and Bgra8UnormSrgb are supported formats for surfaces, but I think for a texture RGBA should always be available?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant