Saving a field containing text and images

Phil Jimmieson p.jimmieson at
Sat Aug 25 13:17:12 EDT 2007

Quoting Éric Miclo <eric.miclo at>:

> Hello Richard,
> Well, I'd like to save the field in RTF with images embeded so other  
> apps could open it.
> The problem is that I don't know how to add an image to a RTF file.  
> I've played with base64Encode, imageData, etc without result.
> In fact I have no idea in what format the image has to be encoded to  
> add it at a RTF file.
> Do you have some example?
> I'll continue to search on the net, but so far I didn't find  
> something usefull.

Hi Éric
If you find anything useful it'd be good to see it here. In the 
meantime, if you'd like Revolution to be able to save the images in a 
field along with the text when you retrieve the RTFtext of a field, you 
could consider voting for this enhancement request:

> Le 25 août 07 à 17:33, Richard Gaskin a écrit :
>> Éric Miclo wrote:
>>> I've made some testing by saving the field's htmlText , but after   
>>> that you need to export all the images and it can lead to the   
>>> creation of a huge number of files.
>>> I'd prefered saving all in a rtf, but here I don't know how to do it.
>> If you need these files to be opened with other apps, then  
>> something like RTF would be the way to go.  Given all the support  
>> Rev has built-in for things like base64, imageData, etc., I would  
>> imagine one could write RTFs with embedded images without much  
>> trouble.  Of course if you want these displayable in your app too  
>> you'll need to write an RTF parser than pulls the images back out  
>> again when reading.

I'll have to have a look and see how difficult it would be to write 
something to save an image as RTF. It would be very useful for my major 
Rev project.

Phil Jimmieson
The University of Liverpool, Computer Science Dept, Ashton Bldg,
Ashton Street, Liverpool  L69 3BX   0151 795 4236

This message was sent using IMP, the Internet Messaging Program.

More information about the use-livecode mailing list