@rbflurry/node-red-contrib-image-tools
v0.0.3
Published
A dynamic Image editor node with over 40 functions, a viewer node and a 1D + 2D Barcode Decoder node
Downloads
34
Maintainers
Readme
node-red-contrib-image-tools
A Node-RED node to perform functions on images and decode barcodes.
Screenshots - to whet the appetite
Image processing...
Get image from internet...
Printing text...
Barcode decoding...
FEATURES
Image node
- Read image from file, http, base64 string or buffer
- Print single or multi line text to an image
- Over 40 image function built in with many more possible by using convolution kernels
- Perform 1 or multiple (batch) images processes in each node
- TIP: you can convert a function to batch JSON by clicking the button adjacent to the function dropdown field. Then simply edit the batch JSON into an array
[{...},{...},{...}]
to perform as many operations as needed in one go.
- TIP: you can convert a function to batch JSON by clicking the button adjacent to the function dropdown field. Then simply edit the batch JSON into an array
- Create blank image by setting Image field to an object
{"w":100,"h":100,"background":0}
- All function parameters can be either fixed or passed in by msg/flow/global
- Can output image data as a Jimp image, a buffer or base64 string.
- All functions and parameters are self documenting - a tip under each item in the node editor helps the user
- Partial (non animated) GIF loading & processing support (experimental)
Image viewer node
- View images in the node-red editor (for preview / debug purposes)
- Full credit to rikukissa and dceejay for the excellent node-red-contrib-image-output on which the "image viewer node" is heavily based. (Copy of MIT license included in src files as requested)
- Features include ability to display a jimp image, buffer, file name, base64 string, Data URL, Image URL.
- Works in Internet Explorer (IE11 tested)
Barcode Decode node
- Ability to decode 1D, QR and Data Matrix barcodes. See supported formats.
Other...
- Built in examples.
- In node-red, look under the hamburger menu >> import >> examples >> image tools
- Built in examples.
IMPORTANT - Breaking changes in V1
Version 1 has breaking change ~ vs ~ V0.x versions. Existing flows using the "2D Barcode Decode" node will need to be modified. The easy way of fixing this is to delete any "2D Barcode Decode" & deploy, then update the node, then re-add the new "Barcode Decode" nodes.
Alternatively, you can avoid this issue by performing the following steps...
- Upgrade node-red-contrib-image-tools
- Stop node-red
- Make a backup of your flow.json file
- Opening your flow.json file in a text editor
- Search / replace all instances of
"type":"2D Barcode Decoder"
with"type":"Barcode Decoder"
- Save and close your flow file
- Start node-red
Pre-requisites
None!
Install
Run the following command in the root directory of your Node-RED install.
(Usually this is ~/.node-red
or %userprofile%\.node-red
).
Install from GIT
npm install Steve-Mcl/node-red-contrib-image-tools
Install from NPM
npm install node-red-contrib-image-tools
Alternatively, install from a folder
npm install c:/tempfolder/node-red-contrib-image-tools
Or simply copy the folder node-red-contrib-image-tools
into a folder named nodes
inside your node-red folder then cd
into nodes/node-red-contrib-image-tools
and execute npm install
NOTES
- Tested on Node V10 & V12 only. YMMV
- Bugs are likely :)
KNOWN ISSUES
Clicking the preview image in IE doesn't dismiss it (works in chrome)