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

Consider using the RGBA type for the color pixels. #10

Open
joseluis opened this issue Apr 30, 2021 · 3 comments
Open

Consider using the RGBA type for the color pixels. #10

joseluis opened this issue Apr 30, 2021 · 3 comments
Labels
later This issue or pull request will be looked into at a later point of time

Comments

@joseluis
Copy link

The rgb crate allows no-copy high-level interoperability. Its RGBA type implements the From and Into traits from/to a tuple of 4 values like the ones used right now.

It would make this crate much easier to use together with other graphic crates that uses other pixel color representations.

@gp-97
Copy link
Owner

gp-97 commented Apr 30, 2021

Hey @joseluis thanks for suggestion. The reason why I am using tuples right now is that it is just a temporary workaround. I was waiting for photon_rs library to make their RGBA struct public, which they did in their yesterday's release.
I am taking a couple of days off and will work upon the changes afterwards.
Also if this rgb crate is better suited, I would be more than happy to use it instead.

@joseluis
Copy link
Author

Ok I see. Although their Rgba structure is much less versatile for inter-op.

It may still be useful to use the rgb::RGBA type at least for the outside API, since it wouldn't add any additional computational or memory cost, and wouldn't increase compilation times either.

@gp-97
Copy link
Owner

gp-97 commented Apr 30, 2021

Yeah, thats logical. I will surely look into it.

@gp-97 gp-97 added the later This issue or pull request will be looked into at a later point of time label May 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
later This issue or pull request will be looked into at a later point of time
Projects
None yet
Development

No branches or pull requests

2 participants