# Using Jimp in function node

**URL:** <https://discourse.nodered.org/t/using-jimp-in-function-node/96061>\
**Category:** General\
**Tags:** function-node\
**Created:** [17 March 2025 11:27 UTC](https://discourse.nodered.org/t/using-jimp-in-function-node/96061 "2025-03-17T11:27:55Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [17 March 2025 11:39 UTC](https://discourse.nodered.org/t/using-jimp-in-function-node/96061/3 "2025-03-17T11:39:25Z")

</div>

> [@mima232](#):
>
> I wanted to use Jimp (which is installed with node-red-contrib-image-tools) inside function node. My usage is to get pixel array out of png image

There is no need to import Jimp.

What you are doing here is (unnecessarily) importing a DIFFERENT version of Jimp to the version image-tools installs.

The image node already outputs the image (and its properties) so you can access the pixel data see this example where I set `msg.image` in the image node and in the function "colorise" I call `setPixelColor`: [How to generate an image from the 8x8 raw heat map data of an AMG8833 thermal sensor - #8 by Steve-Mcl](https://discourse.nodered.org/t/how-to-generate-an-image-from-the-8x8-raw-heat-map-data-of-an-amg8833-thermal-sensor/31604/8)

e.g.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/9/0953be154308e8df81853eeb9c861f91f572df28.png)

---

_[View the full topic](https://discourse.nodered.org/t/using-jimp-in-function-node/96061)._
