Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possible to line break a big string? #14

Closed
sparten9999 opened this issue May 3, 2020 · 8 comments
Closed

possible to line break a big string? #14

sparten9999 opened this issue May 3, 2020 · 8 comments
Labels
question Further information is requested

Comments

@sparten9999
Copy link

is it possible to add line breaks to the node? i have several lines taht need to be written to an image and the only way i can figure out how to do it, is to use multiple image nodes in a chain and write each line that way. it takes like 20 seconds to go through all the nodes. for about 10 lines

@Steve-Mcl
Copy link
Owner

Hi, there are several ways to achieve this but firstly, please ensure when you chain the image nodes that the output is set to "Image" - as the tip below says...
image
image

If that is still slow, you can try these 2 methods...

  1. Use the "Print Aligned" function then set the width to the required max size (or auto) - your text should wrap...
    image

  2. For finer control & positioning, use batch mode & enter your 10 lines...
    NOTE: To get you started, setup a "Print Aligned" function then click the "convert to batch button", then edit the batch to create an array of operations (example flow below has 16 Print operations)
    image

image

here is an example flow...

[{"id":"14264e55.c1eea2","type":"inject","z":"66a6a259.d08c0c","name":"base64","topic":"","payload":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMSEhUTExMVFhUXGBgYGBgYGB0XGRodGBoYGBcaGBcYHSkgGB4mHhoYITEhJSorLi4uFx8zODMtNygtLisBCgoKDg0OGxAQGi0mICUtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLf/AABEIAKIBNwMBIgACEQEDEQH/xAAbAAABBQEBAAAAAAAAAAAAAAABAAIDBAUGB//EADoQAAIBAwMCBAUCBQMDBQEAAAECEQADEgQhMSJBBRNRYQYycYGRFCNCUqGx0QdiwTNy8BVEguHxJP/EABgBAAMBAQAAAAAAAAAAAAAAAAABAgME/8QAKREAAgICAgICAAUFAAAAAAAAAAECESExEkEDUSJhE3Gh4fAEI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TBCFK05BWCRuONqVKhAdDqVDadmYSwAgncjpHB7V0ugE2FJ3O253PAo0qqPRDLd5AVSQD1E8d5Xeu0+CWLXkRjKfu9J3Xa6h4O3O9KlUeTS/JleM8L+IdS76m8WdmJvXJJJM795+g/FZ4pUqfRU9gpoNGlQT0B6VKlQUj//2Q==","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":270,"y":80,"wires":[["a206978f.e503e8","24abcf12.33e8"]]},{"id":"a206978f.e503e8","type":"jimp-image","z":"66a6a259.d08c0c","name":"Batch print texts","data":"payload","dataType":"msg","ret":"b64","parameter1":"[{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",10,0,{\"text\":\"Text line 1\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",10,20,{\"text\":\"Text line 2\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",10,40,{\"text\":\"Text line 3\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",10,60,{\"text\":\"Text line 4\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",10,80,{\"text\":\"Text line 5\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",10,100,{\"text\":\"Text line 6\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",10,120,{\"text\":\"Text line 7\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",10,140,{\"text\":\"Text line 8\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",0,0,{\"text\":\"Another text line 1\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_RIGHT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",0,20,{\"text\":\"Another text line 2\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_RIGHT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",0,40,{\"text\":\"Another text line 3\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_RIGHT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",0,60,{\"text\":\"Another text line 4\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_RIGHT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",0,80,{\"text\":\"Another text line 5\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_RIGHT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",0,100,{\"text\":\"Another text line 6\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_RIGHT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",0,120,{\"text\":\"Another text line 7\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_RIGHT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",0,140,{\"text\":\"Another text line 8\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_RIGHT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]}]","parameter1Type":"json","parameter2":"0","parameter2Type":"num","parameter3":"0","parameter3Type":"num","parameter4":"Text line 1","parameter4Type":"str","parameter5":"HORIZONTAL_ALIGN_LEFT","parameter5Type":"AlignX","parameter6":"VERTICAL_ALIGN_TOP","parameter6Type":"AlignY","parameter7":"","parameter7Type":"auto","parameter8":"","parameter8Type":"auto","parameterCount":1,"jimpFunction":"batch","selectedJimpFunction":{"name":"batch","fn":"batch","description":"apply one or more functions","parameters":[{"name":"options","type":"json","required":true,"hint":"an object or an array of objects containing {\"name\" : \"function_name\", \"parameters\" : [x,y,z]}.  Refer to info on side panel}"}]},"x":420,"y":80,"wires":[["acb3b07c.995ee"]],"icon":"font-awesome/fa-image"},{"id":"acb3b07c.995ee","type":"image viewer","z":"66a6a259.d08c0c","name":"","width":"400","data":"payload","dataType":"msg","x":590,"y":80,"wires":[[]]},{"id":"24abcf12.33e8","type":"jimp-image","z":"66a6a259.d08c0c","name":"","data":"payload","dataType":"msg","ret":"b64","parameter1":"FONT_SANS_16_WHITE","parameter1Type":"jimpFont","parameter2":"0","parameter2Type":"num","parameter3":"0","parameter3Type":"num","parameter4":"This is a long text that should wrap when it reaches the edge. This is a long text that should wrap when it reaches the edge. This is a long text that should wrap when it reaches the edge. This is a long text that should wrap when it reaches the edge. This is a long text that should wrap when it reaches the edge. ","parameter4Type":"str","parameter5":"HORIZONTAL_ALIGN_LEFT","parameter5Type":"AlignX","parameter6":"VERTICAL_ALIGN_TOP","parameter6Type":"AlignY","parameter7":"","parameter7Type":"auto","parameter8":"","parameter8Type":"auto","parameterCount":8,"jimpFunction":"print2","selectedJimpFunction":{"name":"print aligned","fn":"print","description":"Print text to the image","parameters":[{"name":"font|str","type":"jimpFont","required":true,"hint":"font to print. NOTE: This can be one of the presets or the path to a fnt file"},{"name":"x","type":"num","required":true,"hint":"x coordinate to print text"},{"name":"y","type":"num","required":true,"hint":"y coordinate to print text"},{"name":"text","group":"options","type":"str","required":true,"hint":"text to print"},{"name":"alignmentX","group":"options","type":"AlignX","required":false,"hint":"X Alignment"},{"name":"alignmentY","group":"options","type":"AlignY","required":false,"hint":"Y Alignment"},{"name":"maxWidth","type":"auto|num","required":false,"hint":"wrap text at maxWidth"},{"name":"maxHeight","type":"auto|num","required":false,"hint":""}]},"x":430,"y":360,"wires":[["d42ef8ed.56d1f8"]],"icon":"font-awesome/fa-image"},{"id":"d42ef8ed.56d1f8","type":"image viewer","z":"66a6a259.d08c0c","name":"","width":"400","data":"payload","dataType":"msg","x":590,"y":360,"wires":[[]]}]

Lastly, what size image are you processing?

@Steve-Mcl Steve-Mcl added the question Further information is requested label May 6, 2020
@sparten9999
Copy link
Author

i wasnt having luck with the batch mode. maybe i was screwing it up. ill give this flow a try. the images varied in size. but odds are it was so slow because it was looping though the edit node multiple times

@sparten9999
Copy link
Author

this does look like it will work. but i meant is it possible to break a single large string without a batch. say the following was the string. have the node have an option "break on" setting. so if it sees \n it would split then. it could even just work like a batch but would be another way of adding the lines to pics. instead of making multiple payloads. you just send the string and a thing to split on.

str = line 1 \r\nline 2 \r\nline 3 \r\nline 4
would print out onto a picture like taht

line 1 \n
line 2 \n
line 3 \n
line 4 \n

not sure if thats doable or what. but knowing how the batch works is enough now. thanks

@Steve-Mcl
Copy link
Owner

I guess you have tried adding \n and it didn't work?

If it doesn't then it's likely a shortcoming of the underlying jimp library.

@Steve-Mcl
Copy link
Owner

OK, i have added a workaround in the node (would be nice if the jimp library did this but it doesnt

Demo...

image

flow...

[{"id":"e0357ec7.4280f","type":"inject","z":"c6dc7a8e.4e4518","name":"base64","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":250,"y":140,"wires":[["c3a7b38c.52c78"]]},{"id":"c3a7b38c.52c78","type":"jimp-image","z":"c6dc7a8e.4e4518","name":"","data":"{\"w\":300,\"h\":600,\"background\":\"#aaaaff\"}","dataType":"json","ret":"b64","parameter1":"FONT_SANS_12_BLACK","parameter1Type":"jimpFont","parameter2":"0","parameter2Type":"num","parameter3":"0","parameter3Type":"num","parameter4":"This is a long text that should wrap when it reaches the edge - a new line next\\r\\nThis is a long text that should wrap when - 2 new lines next\\n\\nit reaches the edge. - 3 new lines next\\n\\n\\nThis is a long text that should wrap when it reaches the edge. This is a long text that should wrap when it reaches the edge. This is a long text that should wrap when it reaches the edge. This is a long text that should wrap when it reaches the edge.","parameter4Type":"str","parameter5":"HORIZONTAL_ALIGN_LEFT","parameter5Type":"AlignX","parameter6":"VERTICAL_ALIGN_TOP","parameter6Type":"AlignY","parameter7":"","parameter7Type":"auto","parameter8":"","parameter8Type":"auto","parameterCount":8,"jimpFunction":"print2","selectedJimpFunction":{"name":"print aligned","fn":"print","description":"Print text to the image","parameters":[{"name":"font|str","type":"jimpFont","required":true,"hint":"font to print. NOTE: This can be one of the presets or the path to a fnt file"},{"name":"x","type":"num","required":true,"hint":"x coordinate to print text"},{"name":"y","type":"num","required":true,"hint":"y coordinate to print text"},{"name":"text","group":"options","type":"str","required":true,"hint":"text to print"},{"name":"alignmentX","group":"options","type":"AlignX","required":false,"hint":"X Alignment"},{"name":"alignmentY","group":"options","type":"AlignY","required":false,"hint":"Y Alignment"},{"name":"maxWidth","type":"auto|num","required":false,"hint":"wrap text at maxWidth"},{"name":"maxHeight","type":"auto|num","required":false,"hint":""}]},"x":410,"y":140,"wires":[["343cd409.7a07bc"]],"icon":"font-awesome/fa-image"},{"id":"343cd409.7a07bc","type":"image viewer","z":"c6dc7a8e.4e4518","name":"","width":"300","data":"payload","dataType":"msg","x":570,"y":140,"wires":[[]]}]

I'll publish an update soon to here and NPM (for node-red)

@Steve-Mcl
Copy link
Owner

Steve-Mcl commented May 7, 2020

Final testing before publish...

image

[{"id":"e0357ec7.4280f","type":"inject","z":"c6dc7a8e.4e4518","name":"blank image","topic":"","payload":"{\"w\":320,\"h\":240,\"background\":\"#aaaaff\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":170,"y":140,"wires":[["4a171658.d44518","f660db34.b733a8","c3a7b38c.52c78"]]},{"id":"f660db34.b733a8","type":"jimp-image","z":"c6dc7a8e.4e4518","name":"Batch print texts","data":"payload","dataType":"msg","ret":"img","parameter1":"[{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_BLACK\",10,0,{\"text\":\"Text line 1\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",10,20,{\"text\":\"Text line 2\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_BLACK\",10,40,{\"text\":\"Text line 3\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",10,60,{\"text\":\"Text line 4\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_BLACK\",10,80,{\"text\":\"Text line 5\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",10,100,{\"text\":\"Text line 6\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_BLACK\",10,120,{\"text\":\"Text line 7\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",10,140,{\"text\":\"Text line 8\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",10,0,{\"text\":\"Another text line 1\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_RIGHT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_BLACK\",10,20,{\"text\":\"Another text line 2\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_RIGHT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",10,40,{\"text\":\"Another text line 3\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_RIGHT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_BLACK\",10,60,{\"text\":\"Another text line 4\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_RIGHT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",10,80,{\"text\":\"Another text line 5\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_RIGHT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_BLACK\",10,100,{\"text\":\"Another text line 6\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_RIGHT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_WHITE\",10,120,{\"text\":\"Another text line 7\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_RIGHT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_16_BLACK\",10,140,{\"text\":\"Another text line 8\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_RIGHT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]}]","parameter1Type":"json","parameter2":"0","parameter2Type":"num","parameter3":"0","parameter3Type":"num","parameter4":"Text line 1","parameter4Type":"str","parameter5":"HORIZONTAL_ALIGN_LEFT","parameter5Type":"AlignX","parameter6":"VERTICAL_ALIGN_TOP","parameter6Type":"AlignY","parameter7":"","parameter7Type":"auto","parameter8":"","parameter8Type":"auto","parameterCount":1,"jimpFunction":"batch","selectedJimpFunction":{"name":"batch","fn":"batch","description":"apply one or more functions","parameters":[{"name":"options","type":"json","required":true,"hint":"an object or an array of objects containing {\"name\" : \"function_name\", \"parameters\" : [x,y,z]}.  Refer to info on side panel}"}]},"x":440,"y":200,"wires":[["f3cc5dcb.4019f"]],"icon":"font-awesome/fa-image"},{"id":"f3cc5dcb.4019f","type":"image viewer","z":"c6dc7a8e.4e4518","name":"","width":"300","data":"payload","dataType":"msg","x":590,"y":200,"wires":[[]]},{"id":"c3a7b38c.52c78","type":"jimp-image","z":"c6dc7a8e.4e4518","name":"Line breaks (\\r or \\n)","data":"payload","dataType":"msg","ret":"b64","parameter1":"FONT_SANS_12_BLACK","parameter1Type":"jimpFont","parameter2":"0","parameter2Type":"num","parameter3":"0","parameter3Type":"num","parameter4":"This is a long text that should wrap when it reaches the edge - a new line next\\r\\nThis is a long text that should wrap when - 2 new lines next\\n\\nit reaches the edge. - 3 new lines next\\n\\n\\nThis is a long text that should wrap when it reaches the edge. This is a long text that should wrap when it reaches the edge. This is a long text that should wrap when it reaches the edge. This is a long text that should wrap when it reaches the edge.","parameter4Type":"str","parameter5":"HORIZONTAL_ALIGN_LEFT","parameter5Type":"AlignX","parameter6":"VERTICAL_ALIGN_TOP","parameter6Type":"AlignY","parameter7":"","parameter7Type":"auto","parameter8":"","parameter8Type":"auto","parameterCount":8,"jimpFunction":"print2","selectedJimpFunction":{"name":"print aligned","fn":"print","description":"Print text to the image","parameters":[{"name":"font|str","type":"jimpFont","required":true,"hint":"font to print. NOTE: This can be one of the presets or the path to a fnt file"},{"name":"x","type":"num","required":true,"hint":"x coordinate to print text"},{"name":"y","type":"num","required":true,"hint":"y coordinate to print text"},{"name":"text","group":"options","type":"str","required":true,"hint":"text to print"},{"name":"alignmentX","group":"options","type":"AlignX","required":false,"hint":"X Alignment"},{"name":"alignmentY","group":"options","type":"AlignY","required":false,"hint":"Y Alignment"},{"name":"maxWidth","type":"auto|num","required":false,"hint":"wrap text at maxWidth"},{"name":"maxHeight","type":"auto|num","required":false,"hint":""}]},"x":740,"y":140,"wires":[["343cd409.7a07bc"]],"icon":"font-awesome/fa-image"},{"id":"343cd409.7a07bc","type":"image viewer","z":"c6dc7a8e.4e4518","name":"","width":"300","data":"payload","dataType":"msg","x":930,"y":140,"wires":[[]]},{"id":"4a171658.d44518","type":"jimp-image","z":"c6dc7a8e.4e4518","name":"3D effect text (Batch mode)","data":"payload","dataType":"msg","ret":"img","parameter1":"[{\"name\":\"print\",\"parameters\":[\"FONT_SANS_64_BLACK\",12,2,{\"text\":\"Text line 1\\nText line 2\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]},{\"name\":\"print\",\"parameters\":[\"FONT_SANS_64_WHITE\",10,0,{\"text\":\"Text line 1\\nText line 2\",\"alignmentX\":\"Jimp.HORIZONTAL_ALIGN_LEFT\",\"alignmentY\":\"Jimp.VERTICAL_ALIGN_TOP\"},-1,-1]}]","parameter1Type":"json","parameter2":"0","parameter2Type":"num","parameter3":"0","parameter3Type":"num","parameter4":"Text line 1","parameter4Type":"str","parameter5":"HORIZONTAL_ALIGN_LEFT","parameter5Type":"AlignX","parameter6":"VERTICAL_ALIGN_TOP","parameter6Type":"AlignY","parameter7":"","parameter7Type":"auto","parameter8":"","parameter8Type":"auto","parameterCount":1,"jimpFunction":"batch","selectedJimpFunction":{"name":"batch","fn":"batch","description":"apply one or more functions","parameters":[{"name":"options","type":"json","required":true,"hint":"an object or an array of objects containing {\"name\" : \"function_name\", \"parameters\" : [x,y,z]}.  Refer to info on side panel}"}]},"x":200,"y":260,"wires":[["5d932ff0.7427"]],"icon":"font-awesome/fa-image"},{"id":"5d932ff0.7427","type":"image viewer","z":"c6dc7a8e.4e4518","name":"","width":"300","data":"payload","dataType":"msg","x":250,"y":300,"wires":[[]]}]

@Steve-Mcl
Copy link
Owner

Steve-Mcl commented May 7, 2020

Updated NPM and Flows Library.

Please test and re-open if no good.

Thanks for your feedback

@sparten9999
Copy link
Author

i played with the new update a tiny bit and it looks perfect. ill do some more with it and if there is an issue ill let you know.

thank you very much this would simplify things a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants