# Show an image on the dashboard

**URL:** <https://discourse.nodered.org/t/show-an-image-on-the-dashboard/30466>\
**Category:** General\
**Created:** [21 July 2020 11:38 UTC](https://discourse.nodered.org/t/show-an-image-on-the-dashboard/30466 "2020-07-21T11:38:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hattori](https://avatars.discourse-cdn.com/v4/letter/h/bb73d2/32.png) [@Hattori](https://discourse.nodered.org/u/Hattori)\
**Post date:** [21 July 2020 11:38 UTC](https://discourse.nodered.org/t/show-an-image-on-the-dashboard/30466/1 "2020-07-21T11:38:42Z")

</div>

I have an image of size 1280x800 contained in an Array. The Array is one dimensional with length 1280x800. I would like to be able to plot the corresponding image in the dashboard. I saw examples that loads the image from a file, but as i already have an array, i don't want to save the image and reload it. If the array have to be converted/reshape, i guess it is ok. Is there a solution ?

---

<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:** [21 July 2020 11:56 UTC](https://discourse.nodered.org/t/show-an-image-on-the-dashboard/30466/2 "2020-07-21T11:56:33Z")

</div>

> [@Hattori](#):
>
> Is there a solution

Yes / depends.

What kind of data is in this array? Is it simple RGB pixels? Is it a jpeg? Is it base64 encoded PNG?

The answer depends on what it is.

---

<div class="post-metadata">

**Author:** ![Hattori](https://avatars.discourse-cdn.com/v4/letter/h/bb73d2/32.png) [@Hattori](https://discourse.nodered.org/u/Hattori)\
**Post date:** [21 July 2020 13:07 UTC](https://discourse.nodered.org/t/show-an-image-on-the-dashboard/30466/3 "2020-07-21T13:07:15Z")

</div>

this is actualy raw greyscale data. maybe a convertion is needed ?

---

<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:** [21 July 2020 13:30 UTC](https://discourse.nodered.org/t/show-an-image-on-the-dashboard/30466/4 "2020-07-21T13:30:42Z")

</div>

I suspect yes.

Have a look at [this post](https://discourse.nodered.org/t/unable-to-display-image-from-base64/29530/18) I did for another users. It uses the image-tools library & loops through his data using `setPixel` functions to re-constitute and image from raw data.

Should get you started.

---

<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:** [19 September 2020 13:30 UTC](https://discourse.nodered.org/t/show-an-image-on-the-dashboard/30466/5 "2020-09-19T13:30:49Z")

</div>

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