8000 Any way to load new image from bytes? · Issue #18 · kosinix/raster · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Any way to load new image from bytes? #18

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
canselcik opened this issue Jun 17, 2018 · 1 comment
Open

Any way to load new image from bytes? #18

canselcik opened this issue Jun 17, 2018 · 1 comment

Comments

@canselcik
Copy link

Hi,

I would like to use the include_bytes!(...) macro but as far as I can see there is no way to load a new image from bytes using raster. If that's right I would be more than happy to add it and submit a PR. Thoughts?

@francesca64
Copy link
Collaborator

The bytes field of Image is public (along with all the other fields), so you could manually construct it with very little trouble. Though, a convenience method would be nice, since bad things will happen if you fill in the wrong values for height and width.

If you do want to make a PR, I'll remove the obnoxious rustfmt enforcement I added a while back...

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
0