Database blobs -> png cell?

Dear All,

I am a bit stuck!  I am retrieving image data from a database (stored as blobs), and I can't seem to figure-out how to convert the retrieved data into eg a PNG cell.

Any help greatly appreciated!

Kind regards


As far as I know, Blob handling is still database specific. But you should get an InputStream somehow from the Blob, which you can feed into a PNGImageContent constructor. Calling toImageCell on the ImageContent-object gives you a PNGImage[Blob]Cell.

Thanks for the reply, Thor.

After a bit of playing around, I have found that the data brought back from the BLOB field by the Database Connector node is 'almost right', but not quite...  It looks like during retrieval, a 'code page' translation has been applied - meaning some of the bytes are modified(?)

So I guess what I am looking for is (a) ability to retrieve BLOB fields into 'binary' cells rather than string; and (b) a binary -> PNG converter node.

For the time being, I am working around the problem by using the python snippet node + import cx_Oracle, because I vaguely know what I'm doing with these : )

However, I would like to eventually solve this 'properly' - and that might mean taking the plunge with node writing... yikes!

Kind regards