[Announce] node-red-contrib-image-tools - updated v1.3.1

Evening Steve,
Well I'm not a huge fan to duplicate the image-output node, although I understand your reasons... From now on I have to install two separate image-output nodes. I have been contributing a series of pull-requests in the past to Rikukissa's node, and I had planned to create new pull requests in the near future. And now I have to choose: create pull requests for both nodes (which I don't see to happen due to lack of free time) or only update one of both (but from then on both nodes will start to grow apart more and more). But seems my feedback is a bit too late, since your own image-output node clone is already published on npm...
Bart

I think Steve's is built into his set of nodes so isn't separately installable (at least I don't think so). I think stripping off the header could be done in the existing node without needing jimp, and adding the node as a prereq for his would be easy but meh, I won't lose sleep over it. Don't mind which one you target for pull requests.

Oh the agony of decision...

@BartButenaers I understand your comments and concerns and I agonised over updating the original over adding it to "image-tools" but I felt strongly enough to bring it "inside".
If someone can propose a way to inherit/depend on another node-red node I would seriously consider removing it in favour duplicated functionality.

@dceejay it is built in as I felt it provided core functionality (e.g handle Jimp object (I e. Reduce convertions during image edit chain) pass through for chaining, load from URL/buffer/file etc). The fact image-tools depends on jimp for "understanding" image data (without mime type) I felt it too much of an ask of the original to support all these extras in what is a relatively a solid light node. Who am I to decide :thinking:

Food for thought...

If a user needs purely non mime none jimp image preview without any image processing, install the original. If there is any requirement for image editing, install "image-tools" instead and you will get a built-in image viewer to boot. Either is good. Neither is bad. Right ?

Last word...

If someone can propose a way to make thr original node play nicely with the functionality of "image-tools" please let me know and I'll try to undo the duplication. E.g. if the original didn't depend (require) jimp can i still check instanceof Jimp or call jimp functions if it turns out a user sent a jimp object??

I am aware the situation is not ideal but as I tried to explain in earlier post I felt it necessary (though I will concede lack of experience)

Perhaps I will take another look tomorrow with fresh eyes, a node playground & some helpful tips from the community. Perhaps I can find a compromise that keeps them separate entities without bloating the original node.

:crossed_fingers:

1 Like

Hi all, updated git/npm to v0.2.4

Biggest element is the addition of 2 image processing functions...

  • Print
  • Print with alignment

See full read me here

Hi, i can't insert the 2D Barcode Decoder in a flow, but i imported the example and it works fine.

can you explain a bit more please?

Are you saying when you drag and drop from the node list on the left to the design area that the node doesn't appear on the canvas?

Perhaps a screen shot? Anything in the node-red log? Anything in the browser console (F12)?

What browser are you using? Have you tried another browser?

What if you hold CTRL & click in design area to bring up the insert node list - can you add a new 2d barcode node to the design area this way?

Please let me know. Ta.

1 Like

Hello,

Yes, when i drag and drop from the node list on the left to the design area tha the node doesn't appear on the canvas. The node moves on the left when i try.
After trying to insert the node, node-red requests to deploy and the following warning appears.

I tried with internet explorer, chrome and firefox.

With CTRL and click it works.

Regards

What version of Node-RED and nodejs are you using?

Hi, i am using,
image

most odd.

Will take a look when I get some time.

Thanks for letting me know.

1 Like

So, when you drop a new 2d barcode node onto the editor, the "specification" part is blank. Thats why there is a triangle above the node & why you get an warning (like in your screen shot). This is pretty standard and normal for nodes that required some kind of setup before deploying. The built in help describes what this specification filed should be.

In a future version I may default this to something usable.

So double click the newly dropped node and look at the help info in the right hand side bar. You can copy and paste the sample JSON into the specification before deploying - adjust it if necessary.

1 Like

V0.2.5 released

Small bug fix update (thanks to @cymplecy)

  • Creating a blank image width and height were revered - oopsy.
  • some tidy up
  • version bump

Enjoy.

2 Likes

Tested and working - ta :slight_smile:

2 Likes

Just got an issue with installing this on Win10 - the image viewer node isn't showing up - tried it twice - stopped/started node-red - refreshed browser - its not there

image1

image2

image3

Oh dear.

Can I ask, what browser (and have you tried others?) And what nodejs version and what node-red version please?

Vivaldi (and just tried Chrome - same issue)

Node-RED 1.0.1

node.js 10.16.3

Bugger. My guess is v1.0.1

Will try to get a look some day soon but due to home matters I don't have much play time till next week.

Cheers.

More info

I saw something in the console about DEFAULT_WIDTH already being defined so I wondered if there was a conflict with contrib-image-output node

I removed image-output and then removed image-tools and re-installed image-tools and now I have all 3 nodes in the sidebar

image

Yep def some conflict going on
I tried re-adding image-output - doesn't appear in side bar and the console error returns

image

JFI separate [minor] issue

image

I was sending a jpg encoded using Base64 from my phone vi a MQTT to my Win10 instance and was surprised that the viewer didn't display it

Then I thought - I really should stick the image node before it - but that didn't work either

I then added the standard Base64 node in and all was good.

But should the nodes handle the image natively ?