# Retrieving BLOB from databse

**URL:** <https://forum.inductiveautomation.com/t/retrieving-blob-from-databse/23931>\
**Category:** Ignition\
**Created:** [April 8, 2019, 6:33pm UTC](https://forum.inductiveautomation.com/t/retrieving-blob-from-databse/23931 "2019-04-08T18:33:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeaton154](https://avatars.discourse-cdn.com/v4/letter/j/ebca7d/32.png) [@jeaton154](https://forum.inductiveautomation.com/u/jeaton154)\
**Post date:** [April 8, 2019, 6:33pm UTC](https://forum.inductiveautomation.com/t/retrieving-blob-from-databse/23931/1 "2019-04-08T18:33:02Z")

</div>

Hello, I am new to this forum and really trying to figure out how to retrieve a jpg from my database to a either an image or label canvas in my project. I read the other forums on this, but they were from 2+ years ago and I couldn’t figure it out with the previous posts on this.

–[http://forum.inductiveautomation.com/t/display-blob-image-from-database/14507--](http://forum.inductiveautomation.com/t/display-blob-image-from-database/14507--)

If someone could please let me know I would greatly appreciate it.

---

<div class="post-metadata">

**Author:** ![Stevenson.Yuan](https://avatars.discourse-cdn.com/v4/letter/s/ac91a4/32.png) [@Stevenson.Yuan](https://forum.inductiveautomation.com/u/Stevenson.Yuan)\
**Post date:** [April 10, 2019, 3:39pm UTC](https://forum.inductiveautomation.com/t/retrieving-blob-from-databse/23931/2 "2019-04-10T15:39:50Z")

</div>

This post might be more relevant:

> [@Load image from DB into Image object](http://forum.inductiveautomation.com/t/load-image-from-db-into-image-object/12309/2):
>
> The following code will display a BLOB as the ‘icon’ on a Label component: from javax.swing import ImageIcon from java.io import ByteArrayInputStream from javax.imageio import ImageIO from java.awt import Image from java.net import URL from java.io import File image = # your readfileasbytes output bais = ByteArrayInputStream(image) bImageFromConvert = ImageIO.read(bais) lbl3 = event.source.parent.getComponent('lblImage3') boundWidth = lbl3.width boundHeight = lbl3.height originalWidth = bImage…

You can also load it into image components or the paintable canvas.
