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

Type-safe pixel format #35

Closed
kornelski opened this issue Jan 26, 2017 · 1 comment
Closed

Type-safe pixel format #35

kornelski opened this issue Jan 26, 2017 · 1 comment

Comments

@kornelski
Copy link
Contributor

Frame.buffer is a Cow<'a, [u8]>. Even if I set pixel type to be RGBA, I still have to deal with a slice of u8.

I would prefer if type system was used to ensure the right pixel format, e.g.

let reader: gif::Reader<_, pixel::RGBA> = decoder.read_info();

which would return Frame<RGBA> with Cow<'a, [RGBA]>.

@nwin
Copy link
Contributor

nwin commented Jan 26, 2017

Will be fixed via #33.

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

No branches or pull requests

2 participants