Drawing V1 #1167
hipstersmoothie
started this conversation in
Ideas
Drawing V1
#1167
Replies: 1 comment
-
Maybe we could use something like this built in so that the user doesn't have to supply a canvas (ex in node) https://www.npmjs.com/package/canvaskit-wasm if It were built in the API might look like: const image = await jimp.read('my-image.jpeg')
// Get a canvas we can draw to like normal canvas
// works in both browser/node
const canvas = await image.getCanvas();
canvas.moveTo(0, 0);
canvas.lineTo(200, 100);
canvas.stroke(); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Right now Jimp doesn't have very good support for "drawing" on an image.
There's one way other than blitting images together: print.
There are some PRs and Issue asking for true drawing support from jimp and I don't really think that's something we should build out. It's a hard problem and one that's largely solved.
Proposal:
I don't think we'd ever be able to compete with the power of a canvas. I think jimp plugins/functions should be more focused on image level "effects" rather than drawing.
Possible API:
A user could bring whatever package they want to draw on the canvas and apply that canvas to jimp image.
Related issues:
Beta Was this translation helpful? Give feedback.
All reactions