Display blob image from database

I have been looking over code in these forums to load an image from the mysql database and have not had much success, I am using version 7.9.2

can anyone share code to display this in a paintable canvas, label, or image component?

here is my query:

presentation = event.source.parent.getComponent('Dropdown').selectedLabel
rowSlide = event.source.parent.currentSlidePath

image = system.db.runScalarPrepQuery("SELECT photo FROM presentations where presentation=? and series_name = ?", [presentation, rowSlide])

I did this also, check this thread here:


for the code I used and the solution provided to me to get it to work correctly.

1 Like

Thanks abishur,
I saw your post and tried that earlier with no luck. I keep getting some errors.

File “event:propertyChange”, line 18, in
AttributeError: ‘NoneType’ object has no attribute ‘width’

Can you post the code you’ve done as a reference?

Edit:

The problem was that I did not save the blob correctly in the database. The label code is good though.