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

Support creating a data URL from a bytestring #91

Open
tomjaguarpaw opened this issue Feb 27, 2019 · 1 comment
Open

Support creating a data URL from a bytestring #91

tomjaguarpaw opened this issue Feb 27, 2019 · 1 comment

Comments

@tomjaguarpaw
Copy link

Currently creating a data URL seems to require loading from a file. Could you also support reading from a bytestring?

https://github.com/ku-fpg/blank-canvas/blob/master/Graphics/Blank/Utils.hs#L47

@RyanGlScott
Copy link
Member

That sounds reasonable to me! The only reason that readDataURL exists, I believe, is to mimic JavaScript's readAsDataURL function, but there's no reason why we couldn't also have a variant of this function that accepts a raw ByteString.

Would you mind making a pull request for this change? Thanks!

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