Skip to content

add color type conversion #2444

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Its-Just-Nans
Copy link
Contributor

Add a from_pixel() method

@fintelia
Copy link
Contributor

There's already the PixelWithColorType trait that gives access to the ExtendedColorType associated with a pixel. Though looks like we might be missing a way to convert from ExtendedColorType -> ColorType

@Its-Just-Nans
Copy link
Contributor Author

I've updated the code

@fintelia
Copy link
Contributor

Sorry for the delay. I think this would be better to expose by adding a method on ExtendedColorType that returns an Option<ColorType>.

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.

2 participants