-
• #2
There isn't anything, but you could add one. The tools are at https://github.com/espruino/EspruinoWebTools
So all you have to do is copy
imageconverter.js
and userequire("imageconverter.js")
to use the tools in Node.js.Since Canvas/etc isn't really provided in Node.js you'd have to use some other image loader and then just pass the RGBA data into imageconverter's RGBAtoString function though.
-
• #3
... also down the bottom of http://www.espruino.com/Graphics#rendering there are instructions on using ImageMagick to create an image on the command-line, but they are quite basic and deal only with creating the
buffer
part of the image - not width/height/etc -
• #4
Thanks Gordon! I found an alternative approach: hacking around the Webtool's
function handleFileSelect(event) { if (event.target.files.length != 1) return;
:)
-
• #5
That's a neat idea! If you've got something that works nicely it'd be great if you could contribute that back - it could be really handy if https://www.espruino.com/Image+Converter accepted multiple files
-
• #6
Of course! If I have success in that direction I will send a PR.
Hi! I need to convert multiple PNG files to compressed image strings and doing so via online image converter (which is awesome for small tasks by the way!) can get a bit tedious. Does anyone have a command line tool for that?
Thank you!