Hi @BartButenaers / @dceejay , so as discussed, I have been evaluating both image viewer nodes in both contribs -image-tools
and -image-output
with a view to removing the built in viewer in favour of the stand alone node.
Rough comparison...
-
image-output
usesjimp-compact
,image-tools
usesjimp
- I might be able to align with this lib but I am concerned the dev might not stay up to date with base jimp lib - thoughts?
-
-image-tools
does not have an output enable button -
-image-output
has no pass though (no output pin), (-image-tools
has a pass though for inline / chained operations (output pin))- this was introduced to reduce
msg
cloning (i.e. msg passes straight through instead of branching off)
- this was introduced to reduce
-
-image-output
doesn't work with a full data URL (spec / mdn) e.g.data:[<mediatype>][;base64],<data>
- however, before displaying the image data in the viewer, it goes on to assume the base64 data will be png and prepends it (regardless of type) - this causes issues with regular Image URLs and Data URLs (see images below)
-
-image-tools
viewer accepts everythingimage-output
does + filename + Image URL + (complete) data URLs-
-image-tools
also infers actual image data type by 1st 5 chars of data portion if mime type is missing
-
-
image-output
resizes image at server-side to reduce traffic back to node-red editor
These are partly the reasons I initially added the viewer (I'll try to find original conversation for reference - if necessary) but mostly the image-output
did not have Jimp
as a dependency at the time of development - and seemed a lot to ask devs to add
Demo...
Here's a demo to try and put the above words into a picture...
note the deliberate typo in the image - base62
What are your thoughts on aligning our 2 viewer nodes in order for me to consider removing the internal viewer?
NOTES
I have modified the original image viewer node to make this demo work (some bug fixes in image-tools viewer I happily happened upon!) + there was another conflict I had to resolve before I could test these side-by-side (both image viewers subscribed to the same comm (RED.comms.subscribe('image'...
) so events were occurring twice at client side.
Image URL issue...
Data URL issue...