xTuple.com xTupleU Blog & News Customer Support

Convert image_data

using Windows version 6.0.3

I am trying to take the image_data column from the image table and insert into a string like

’ as logo

when I try this src table in html text file, I get a broken image

what postgresql functions to I have to use to make this work.

I tried functions like


to no avail.

Any ideas?

Thank you


The image in the database is uuencoded (not a typo) which converts the image to text into the Db. You have to decode using some uu decoder to convert back to an image.

Thanks Anderson,

is there any postgresql query to do this?

All I need is the binary string.

Hi Anderson: Do you know where there is a decoder to convert back to an image and save as a file ?

Larry Cartee

uu encoding/decoding is done in c++ in the xTuple desktop client. I do not believe it is something easily done in postgresql. I’ve done it externally by exporting the image text and decoding back to an image file.

I’m a Linux guy so I use the built in uuencode/uudecode functions as part of a script. Export the database image text and decode it to file.

Thanks, Dave. I was just about to look in the C++ code when I saw this thread. I will take a look there.


Thanks guys

I was trying to use an image in an EDI Profile. In the MQL query.
Oh well…

Hi Bob,
I’m guessing you are wanting to show the image (logo?) in the body of the email? I don’t think I’ve got an answer for you there. However I am familiar with sending emails via xtconnect that contain formated forms like an invoice that have the company logo displayed in the header. Those images are being supplied via a metasql query in the report.