Do you think there is any interest in this...
It uses Jimp and XZING to do what it does.
Features include image conversion, reading writing to file, convolution (custom kernel matrix filters), batch mode processing, output as buffer or base64 and 2D (QR, Data Matrix) decoding.
Any thoughts please?
Release within a week (hopefully)
Cheers.
6 Likes
Looks like a good idea!
My use case (currently with jimp in a function) is to resize ip cam images before further processing - speeds up everything a lot (dashboard, email,...).
2 Likes
Updated title to show release of node.
Github: https://github.com/Steve-Mcl/node-red-contrib-image-tools
npm install node-red-contrib-image-tools
I have added node-red in the tags so hopefully it will soon appear in npm / pallete.
This is actually my first direct contribution to open source & first upload on github (both of which are new to me) so please feedback any observations / error etc.
2 Likes
Hi Steve - just tried to install your excellent node.
Got this message.
npm ERR! 404 'node-red-contrib-image-tools@latest' is not in the npm registry.
Seems like I'm going to have to wait a while for it to be publish.
Yeah, i'm brand new to NPM publishing so i think i'm missing a step.
Anyone?
@Steve-Mcl you still need to publish it to npm yourself before it will be available to install via the palette manager.
For now, it can be manually installed using:
npm install Steve-Mcl/node-red-contrib-image-tools
as that will tell npm to go get it from github rather than from the npm repository.
Hi Steve - looking at your animated screenshots, it looks like your node will be really useful.
I have no experience of NPM publishing, so can't help - but I'm sure there are plenty of people on the forum that can and will.
Cheers from David.
nice - I dint know that either.
I'm looking at the npm publish now.
I guess from 5mins reading I need to add ...
"repository": {
"type": "git",
"url": "https://github.com/Steve-Mcl/node-red-contrib-image-tools.git"
},
to package.json then using CLI do npm publish?
Any pointers?
It installs fine using Nick's suggestion.
Thanks Nick.
1 Like
Dave, check out the examples under the hamburger menu --> Import --> Examples --> Image tools for a quick start.
Now published in npm so installation via npm install node-red-contrib-image-tools
should now be possible.
As I understand it, it will appear in the node-red pallete once its detected in npm.
For anyone interested (and my own future reference)...
- Ensure your project has
node-red
in the keywords in package.json
"keywords": ["node-red"],
- Create a project on github & grab the *.git URL
- Add the repo URL to package.json
"repository": { "type": "git", "url": "http_url.git" },
- git push the above change
- Add the git remote (e.g.
git remote add origin http_url.git
)
- git pull, push (in my case
git pull origin master
, git push origin master
)
- From in your project directory, publish to npm (
npm publish
)
- NOTE: It may be necessary to sign in first (
npm login
)
- NOTE2: It may be necessary to create an account at npmjs.com first
(please feel free to correct me on the above if they have a more streamlined method)
Hi Steve,
Just tried installing via 'npm' as per your instruction.
Got this warning when starting Node-RED.
9 May 11:32:27 - [warn] ------------------------------------------------------
9 May 11:32:27 - [warn] [node-red-contrib-image-tools/jimp] Error: /home/pi/.node-red/node_modules/node-red-contrib-image-tools/jimp.html does not exist
9 May 11:32:27 - [warn] [node-red-contrib-image-tools/xzing2dDecode] Error: /home/pi/.node-red/node_modules/node-red-contrib-image-tools/xzing2dDe code.html does not exist
9 May 11:32:27 - [warn] ------------------------------------------------------
oh dear.
I just tried NPM install & see them files are missing - odd.
let me take a look.
Sorry about that.
So I made a booboo in package.json by adding a files
section (npm noob copy paste error).
Removed it & updated npm - now V0.1.1 - and i tested install from npm myself this time
Can you please try again?
Hi Steve - I've managed to install your node and 'image preview'.
What's the trick to see or open an image with 'image preview' ??
Did you try the samples provided under the node-red?
Image preview is another authors node. I use it to help demonstrate & visually debug in-flow...
If by this you mean "open in an image in an editor or other program on your computer" then you have a few options...
- You could use the image function "write" to save it to a file then open it in editor
- You could send a base64 output to a dashboard image then right click save.
The image-preview is just that - a preview.
Hope that helps?
Thanks Steve - yes I did try the examples.
What I mean is... how do you get the 'preview' to appear (as in your screenshot above)?
There must be something I need to drag or click from the 'image preview' node.
No. Nothing other than to click the inject. Are you getting a debug message? What browser you using?
Did a bit more digging.
The 'image preview' for the effects of your node works fine in Chrome, but not in Firefox (which is my default browser).
I need to check-out what's causing the problem with 'image preview' in FF.
By-the-way, your node works really well.
Thanks for sharing it.