# Node-red-contrib-image-tools background color

**URL:** <https://discourse.nodered.org/t/node-red-contrib-image-tools-background-color/55034>\
**Category:** General\
**Created:** [11 December 2021 09:39 UTC](https://discourse.nodered.org/t/node-red-contrib-image-tools-background-color/55034 "2021-12-11T09:39:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [11 December 2021 09:39 UTC](https://discourse.nodered.org/t/node-red-contrib-image-tools-background-color/55034/1 "2021-12-11T09:39:56Z")

</div>

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.

```auto
[{"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}]

```

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [11 December 2021 11:06 UTC](https://discourse.nodered.org/t/node-red-contrib-image-tools-background-color/55034/2 "2021-12-11T11:06:23Z")

</div>

Take a look at the example flows that come with the node  
 ![Screen Shot 2021-12-11 at 6.03.38 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/e/aeda88004a6a21f20a2c39f4d8e640c3b90908bc.png)  
 ![Screen Shot 2021-12-11 at 6.03.49 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/b/ab95db92ba88116d7ba33a4882da49813efec2ae.png)

 ![Screen Shot 2021-12-11 at 6.04.09 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/9/59529d306368087c35d15884070184d1f6fafe9d.png)

 ![Screen Shot 2021-12-11 at 6.06.02 AM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/5/e5ff933025bdfcdcdef956a175073af1ae1c736e.png)

---

<div class="post-metadata">

**Author:** ![henkkas](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/henkkas/32/39844_2.png) [@henkkas](https://discourse.nodered.org/u/henkkas)\
**Post date:** [11 December 2021 12:09 UTC](https://discourse.nodered.org/t/node-red-contrib-image-tools-background-color/55034/3 "2021-12-11T12:09:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 December 2021 12:09 UTC](https://discourse.nodered.org/t/node-red-contrib-image-tools-background-color/55034/4 "2021-12-25T12:09:22Z")

</div>

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