-
Notifications
You must be signed in to change notification settings - Fork 31
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
data-uri break the process with no error #52
Comments
Are you sure? I don't think that was implemented until Automattic/node-canvas#1193. |
This is working fine with version 1.6.11. But just for the record:
Sorry, I though that const dataURL = require("data-urls");
const data = dataURL('data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==');
const Canvas = require('canvas-prebuilt');
const image = new Canvas.Image();
image.onerror = function (e) {
console.log(e);
}
console.log('before');
image.source = data.body;
console.log('after'); I was expecting an error, but the script finished suddenly in But as I said, this is an issue from the past :) Thanks!! |
Oops, you're right, I was thinking of http-style URLs. Glad that fixed it for you. |
When you run this code, the process break without any error.
Expected output:
before Error: error while reading from input stream after
Current output:
If I change to
canvas
everything works as expected (any 1.6.x version).It works with version 2.0.0-alpha.13 but I can't use it because it is use in
jsdom
and they don't support version 2 yet.Maybe this will be fixed after #51 is done.
The text was updated successfully, but these errors were encountered: