Open houd1ni opened 7 years ago
Special thanx for quick start snippet to @Iwasawafag
Just rolled out very first stuff. See examples in /test/canvas.js There will be big improvements in algorithms and methods in December. https://github.com/houd1ni/jimp/
I'm going to write here info about the progress. Any code is welcome, by the way 😸
@oliver-moran (or any other authorized contributor maybe), How do you feel about some functional lib like ramda? It can enhance the style for complex operations.
Still in work (have a very few time). How about ramda? See above.
@houd1ni curious how this is coming along? maybe we can collaborate and motivate each other. I've taken your concept and pulled it out of the jimp repo, I'm not sure there's an advantage to a direct integration verses using jimp as a dependency. My biggest confusion comes from how best to handle the async jimp calls that are synchronous/blocking in canvas.
See jimp-canvas
@sullivanpt Thank you very much for this support! I've been centered on own projects too much and appreciate any development of non-finished but helpful ideas. I'm a huge fan of different kinds of modularity, so I would like to add some kind of plugin system to JIMP. It seems to be a very little change to support something like this (very rough):
Jimp.use(plugin)
Jimp.read('something.png', (img) => {
const ctx = new img.Canvas(...args) // Or, maybe, without .use, but with `new JimpCanvas(img)` here.
})
Also, it will be ok to move the lib to more modern JS with optimized arrow functions and so. But it's another, but a bit related due to es6-7 plugins support (I love async await so much:) and more isomorphic code.
If you feel OK abut the second plugin approach (new JimpCanvas(img from read func)), then we can split the code to two libraries: one is only for bar codes and the second is about pure canvas stuff with specific specs, canvas-related roadmap and performance tests.
What is the status of this? I would like to see it implemented
The jimp-canvas project implemented just the bare minimum to meet my use case (bar codes) then stalled out for lack of interest.
@MMayla I believe, I'll finally come to this someday this summer. The functionality is very needed.
@houd1ni has someday come? This could maybe work as a plugin to jimp.
@hipstersmoothie almost! Thank you for the interest! I'll have a time after 22nd, made a reminder :)
@hipstersmoothie Jesus, Just added to the week ToDo. Maximum slowpoke.
Let's start from the little scratch now. The roadmap:
The stuff should have similar to canvas API.
@sullivanpt here: https://github.com/houd1ni/jimp
hello, it would be awesome to have circle support
I'm going to implement basic methods such as lines, ellipses and so, using existing low-level manipulation next week. If somebody wants to do the same, please, welcome to the branch: https://github.com/houd1ni/jimp
https://github.com/oliver-moran/jimp/issues/92 https://github.com/oliver-moran/jimp/pull/104
add.info about drawing on canvas: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Drawing_shapes