You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is super cool and I'm excited that you open-sourced it! I'm coming from a python background and I'd like to use the output somehow as a starting point for other programs. Is there a way to call this from the command line so I can script it? I tried using nodejs, but I got stuck trying to require the library properly.
Feel free to close it as this may be out of scope for supporting this use case.
nodejs demo.js
got pixels View3dbuffer {
data: <Buffer fe f9 f1 ff fe f9 ef ff fe f9 ef ff fc fa ed ff fd fb ee ff fe fc f1 ff fe fc f3 ff fd fb f2 ff fb fb ef ff fb fb ef ff fb fb f1 ff fb fb f1 ff fb fb ... >,
shape: [ 200, 284, 4 ],
stride: [ 4, 800, 1 ],
offset: 0 }
/home/hoppeta/projects/palette/atcq/atcq.js:16
atcq.quantize();
^
TypeError: atcq.quantize is not a function
at Function.quantizeSync (/home/hoppeta/projects/palette/atcq/atcq.js:16:8)
at /home/hoppeta/projects/palette/atcq/demo.js:19:26
at handleJPEG (/home/hoppeta/projects/palette/atcq/node_modules/get-pixels/node-pixels.js:44:3)
at doParse (/home/hoppeta/projects/palette/atcq/node_modules/get-pixels/node-pixels.js:114:7)
at /home/hoppeta/projects/palette/atcq/node_modules/get-pixels/node-pixels.js:190:7
at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:511:3)
The text was updated successfully, but these errors were encountered:
Thanks @mattdesl, it works perfectly now! For anyone else searching for this in the future, here is the expected output for atcq@1.0.3 using the supplied baboon image and const maxColors = 32; const targetColors = 5;
This is super cool and I'm excited that you open-sourced it! I'm coming from a python background and I'd like to use the output somehow as a starting point for other programs. Is there a way to call this from the command line so I can script it? I tried using nodejs, but I got stuck trying to require the library properly.
Feel free to close it as this may be out of scope for supporting this use case.
Which gave:
The text was updated successfully, but these errors were encountered: