How can I transfer and convert a picture.jpg to a binary data

Hi people;

I want to make a picture as a background on a ".fodt" document, Am stuck on here because i don’t know how i can transfer the picture to a binary data and put this binary data on the feature

<office:binary-data> of the <draw:frame

Is there a tool to do that , or how i can do it, thanks in advance.

On the relatorio documentation there is an example in how to add image to fields.