Open tomjaguarpaw opened 5 years ago
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!
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