Node-red-contrib-image-tools background color

I manage to generate a qr code, but don't seem to be able to change the background color (to white).
Looked at all the examples, but don't get it right.
Anybody can help me out here.

[{"id":"c7d344bb73c85014","type":"ui_template","z":"e6ca9e0644ea64bf","group":"924979358f962e51","name":"","order":1,"width":"6","height":"6","format":"<img src={{msg.payload}}>\n","storeOutMessages":false,"fwdInMessages":false,"resendOnRefresh":true,"templateScope":"local","className":"","x":500,"y":660,"wires":[[]]},{"id":"063ebc80cbf66031","type":"Barcode Generator","z":"e6ca9e0644ea64bf","name":"Make qr code","data":"payload","dataType":"msg","barcode":"qrcode","barcodeType":"barcode","options":"","optionsType":"ui","sendProperty":"payload","props":[{"p":"rotate","v":"N","vt":"str"},{"p":"includetext","v":"true","vt":"bool"},{"p":"textxalign","v":"center","vt":"str"},{"p":"scaleX","v":"2","vt":"num"},{"p":"scaleY","v":"2","vt":"num"}],"x":400,"y":600,"wires":[["066095b53d55efaf"]]},{"id":"266944de6d846149","type":"inject","z":"e6ca9e0644ea64bf","name":"boot","props":[{"p":"payload"}],"repeat":"","crontab":"","once":true,"onceDelay":"2","topic":"","payload":"This is a QR code","payloadType":"str","x":170,"y":600,"wires":[["063ebc80cbf66031"]]},{"id":"d4fa9dbb034156a0","type":"image viewer","z":"e6ca9e0644ea64bf","name":"","width":"50","data":"payload","dataType":"msg","active":true,"x":690,"y":700,"wires":[[]]},{"id":"53b49524d7a9fb71","type":"jimp-image","z":"e6ca9e0644ea64bf","name":"image background color ?????","data":"payload","dataType":"msg","ret":"b64","parameter1":"4294967295","parameter1Type":"num","parameter2":"","parameter2Type":"auto","parameter3":"RESIZE_BEZIER","parameter3Type":"resizeMode","parameter4":"","parameter4Type":"msg","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":1,"jimpFunction":"background","selectedJimpFunction":{"name":"background","fn":"background","description":"set the default new pixel colour (e.g. 0xFFFFFFFF or 0x00000000) useful for by some operations e.g. contain or rotate","parameters":[{"name":"hex","type":"num","required":true,"hint":"hexadecimal rgba value (must be entered as a decimal e.g. 0xFFFFFFFF = 4294967295)","defaultValue":"4294967295"}]},"x":470,"y":700,"wires":[["d4fa9dbb034156a0","c7d344bb73c85014"]]},{"id":"066095b53d55efaf","type":"jimp-image","z":"e6ca9e0644ea64bf","name":"buffer to image","data":"payload","dataType":"msg","ret":"buf","parameter1":"1000","parameter1Type":"num","parameter2":"","parameter2Type":"auto","parameter3":"RESIZE_BEZIER","parameter3Type":"resizeMode","parameter4":"","parameter4Type":"msg","parameter5":"","parameter5Type":"msg","parameter6":"","parameter6Type":"msg","parameter7":"","parameter7Type":"msg","parameter8":"","parameter8Type":"msg","sendProperty":"payload","sendPropertyType":"msg","parameterCount":3,"jimpFunction":"resize","selectedJimpFunction":{"name":"resize","fn":"resize","description":"resize the image. One of the w or h parameters can be set to automatic (\"Jimp.AUTO\" or -1).","parameters":[{"name":"w","type":"num|auto","required":true,"hint":"the width to resize the image to (or \"Jimp.AUTO\" or -1)"},{"name":"h","type":"num|auto","required":true,"hint":"the height to resize the image to (or \"Jimp.AUTO\" or -1)"},{"name":"mode","type":"resizeMode","required":false,"hint":"a scaling method (e.g. Jimp.RESIZE_BEZIER)"}]},"x":220,"y":660,"wires":[["53b49524d7a9fb71"]]},{"id":"924979358f962e51","type":"ui_group","name":"QR code","tab":"7891fde860e5df8f","order":1,"disp":true,"width":"6","collapse":false,"className":""},{"id":"7891fde860e5df8f","type":"ui_tab","name":"Instellingen","icon":"settings","order":16,"disabled":false,"hidden":false}]

Take a look at the example flows that come with the node
Screen Shot 2021-12-11 at 6.03.38 AM
Screen Shot 2021-12-11 at 6.03.49 AM

1 Like

@zenofmud , thanks very much, I overlooked that example, I was looking at example image manipulation.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.