Closed justinmchase closed 5 years ago
I believe this addresses the concerns in #24 while enabling the core features of the branch.
thank you!
@justinmchase Thanks. Originally I thought it'd be better to allow bypassing the createCanvas()
completely, so one will not go through our HiDPR scaling, or allow other modifications on the canvas on creation. But, honestly I don't see any real-world requirement, so I'm cool with your solution. Thanks.
Could you please just update the README as well (params and node-canvas example sections).
Ok will do.
This adds no additional dependencies and doesn't break anything but instead adds an optional
createCanvas
factory function on the params which a caller can use to inject their own canvas.I plan to implement a
hashicon-cli
library which will inject the node-canvas in to enable server side image rendering.