@schnello
Reading the c# code, this will get you close, it will likely need some tweaking, and you will need to install the buffer parser node (this is my first time using it )
From what you have pasted - it uses ascii to detail the size of the image (which is a shame) - unless there is another way in the parser (@Steve-Mcl?)
Anyway, it should get you fairly close.
You may need to also install
To utilise the pixel data.
You will need to also provide the IP/PORT of the server.
Have fun!
[{"id":"e218090699024d27","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"c266203814a68d6b","type":"tcp request","z":"e218090699024d27","name":"","server":"","port":"","out":"sit","ret":"buffer","splitc":" ","newline":"","trim":false,"tls":"","x":630,"y":185,"wires":[["62fa6fd384fd99c5"]]},{"id":"710de31313433d77","type":"inject","z":"e218090699024d27","name":"Trigger","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":155,"y":185,"wires":[["4f2ffde5f595ccad"]]},{"id":"4f2ffde5f595ccad","type":"change","z":"e218090699024d27","name":"Trigger (TRG)","rules":[{"t":"set","p":"expectImage","pt":"flow","to":"false","tot":"bool"},{"t":"set","p":"payload","pt":"msg","to":"[84,82,71]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":375,"y":185,"wires":[["c266203814a68d6b"]]},{"id":"3f646f5147769daa","type":"change","z":"e218090699024d27","name":"Request (Last Good GIM2)","rules":[{"t":"set","p":"expectImage","pt":"flow","to":"true","tot":"bool"},{"t":"set","p":"payload","pt":"msg","to":"[71,73,77,49]","tot":"bin"}],"action":"","property":"","from":"","to":"","reg":false,"x":425,"y":235,"wires":[["c266203814a68d6b"]]},{"id":"052f8f2467205cd4","type":"link out","z":"e218090699024d27","name":"Request Image","mode":"link","links":["514c2a6dc4aa3735"],"x":1030,"y":205,"wires":[],"inputLabels":["Request"],"l":true},{"id":"514c2a6dc4aa3735","type":"link in","z":"e218090699024d27","name":"Request Image","links":["052f8f2467205cd4"],"x":160,"y":235,"wires":[["3f646f5147769daa"]],"l":true},{"id":"62fa6fd384fd99c5","type":"switch","z":"e218090699024d27","name":"Expext Image?","property":"expectImage","propertyType":"flow","rules":[{"t":"true"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":805,"y":185,"wires":[["7e24bb14c686588c"],["052f8f2467205cd4"]]},{"id":"7e24bb14c686588c","type":"link out","z":"e218090699024d27","name":"Process Image","mode":"link","links":["3651691b95fc244d"],"x":1030,"y":165,"wires":[],"l":true},{"id":"3651691b95fc244d","type":"link in","z":"e218090699024d27","name":"Prcoess Image","links":["7e24bb14c686588c"],"x":160,"y":370,"wires":[["825bd2749d69c9ee"]],"l":true},{"id":"ff14af022f8808cb","type":"inject","z":"e218090699024d27","name":"Test Data (10*10) size","props":[{"p":"payload"},{"p":"JustSoWeHaveACopy","v":"GIMP001001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[71,73,77,80,48,48,49,48,48,49,48,48,48,49,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48]","payloadType":"bin","x":195,"y":440,"wires":[["825bd2749d69c9ee"]]},{"id":"825bd2749d69c9ee","type":"buffer-parser","z":"e218090699024d27","name":"","data":"payload","dataType":"msg","specification":"spec","specificationType":"ui","items":[{"type":"ascii","name":"passFail","offset":3,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"ascii","name":"errorCode","offset":4,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"ascii","name":"imageType","offset":5,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"ascii","name":"imageResult","offset":6,"length":1,"offsetbit":0,"scale":"1","mask":""},{"type":"ascii","name":"rows","offset":7,"length":4,"offsetbit":0,"scale":"1","mask":""},{"type":"ascii","name":"cols","offset":11,"length":4,"offsetbit":0,"scale":"1","mask":""}],"swap1":"","swap2":"","swap3":"","swap1Type":"swap","swap2Type":"swap","swap3Type":"swap","msgProperty":"payload","msgPropertyType":"str","resultType":"keyvalue","resultTypeType":"return","multipleResult":false,"fanOutMultipleResult":false,"setTopic":true,"outputs":1,"x":375,"y":370,"wires":[["f341d24989f463da"]]},{"id":"f341d24989f463da","type":"change","z":"e218090699024d27","name":"Parse Interger ASCII","rules":[{"t":"set","p":"payload.rows","pt":"msg","to":"$number(payload.rows)","tot":"jsonata"},{"t":"set","p":"payload.cols","pt":"msg","to":"$number(payload.cols)","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":605,"y":370,"wires":[["2a1702abdb5c5619"]]},{"id":"2a1702abdb5c5619","type":"function","z":"e218090699024d27","name":"Extract Image Data","func":"const imageData = msg.buffer.slice(15,msg.payload.rows*msg.payload.cols)\nmsg.payload.imageData = imageData\nreturn msg","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":845,"y":370,"wires":[["0da54066cf789b20"]]},{"id":"0da54066cf789b20","type":"debug","z":"e218090699024d27","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1055,"y":365,"wires":[]}]